Skip to content

Commit

Permalink
Disable use of ResizeObserver for menu auto-update
Browse files Browse the repository at this point in the history
Resolves #5256 (comment).

We do not have an official browser support policy, but it would be nice to delay relying on `ResizeObserver` for a major bump and make our official browser support policy clear.

I do not believe we anticipate the `ResizeObserver` getting triggered in many situations anyway since the menu itself shouldn't be resizing. The scroll events are much more critical to auto-updating working properly.
  • Loading branch information
Methuselah96 committed Oct 14, 2022
1 parent 0d4d17a commit 4475586
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/react-select/src/components/Menu.tsx
Expand Up @@ -647,7 +647,8 @@ export const MenuPortal = <
cleanupRef.current = autoUpdate(
controlElement,
menuPortalRef.current,
updateComputedPosition
updateComputedPosition,
{ elementResize: false }
);
}
}, [controlElement, updateComputedPosition]);
Expand Down

0 comments on commit 4475586

Please sign in to comment.