Skip to content

Commit

Permalink
[misc bugfix] Remove body width & scroll jumping occurring in Chrome
Browse files Browse the repository at this point in the history
- use `react-focus-on`'s scrollLock API to prevent this (they manage preserving the width of the scrollbar for us)
  • Loading branch information
cee-chen committed Oct 26, 2022
1 parent f32f5f9 commit daf6a73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/modal/modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export const EuiModal: FunctionComponent<EuiModalProps> = ({

return (
<EuiOverlayMask>
<EuiFocusTrap initialFocus={initialFocus}>
<EuiFocusTrap initialFocus={initialFocus} scrollLock>
{
// Create a child div instead of applying these props directly to FocusTrap, or else
// fallbackFocus won't work.
Expand Down

0 comments on commit daf6a73

Please sign in to comment.