Skip to content

Commit

Permalink
Add inline comment around the resize: false change
Browse files Browse the repository at this point in the history
  • Loading branch information
ciampo committed Oct 11, 2023
1 parent e483ec2 commit 8c95ac1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/components/src/color-palette/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ export function CustomColorPickerDropdown( {
const popoverProps = useMemo< DropdownProps[ 'popoverProps' ] >(
() => ( {
shift: true,
// Disabling resize as it would otherwise cause the popover to show
// scrollbars while dragging the color picker's handle close to the
// popover edge.
resize: false,
...( isRenderedInSidebar
? {
Expand Down
3 changes: 3 additions & 0 deletions packages/components/src/palette-edit/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ function ColorPickerPopover< T extends Color | Gradient >( {
() => ( {
shift: true,
offset: 20,
// Disabling resize as it would otherwise cause the popover to show
// scrollbars while dragging the color picker's handle close to the
// popover edge.
resize: false,
placement: 'left-start',
...receivedPopoverProps,
Expand Down

0 comments on commit 8c95ac1

Please sign in to comment.