Skip to content

Commit

Permalink
Merge pull request #495 from pixiv/toshusai/fix-ios-safari-keyboard-i…
Browse files Browse the repository at this point in the history
…ssue

Fix: input handling for software keyboard in modal dialogs
  • Loading branch information
toshusai authored Mar 22, 2024
2 parents 740fe13 + 91cc165 commit 8d753fa
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/react/src/components/Modal/useCustomModalOverlay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import {
ariaHideOutside,
useOverlay,
useOverlayFocusContain,
usePreventScroll,
} from '@react-aria/overlays'
import { usePreventScroll } from '../DropdownSelector/Popover/usePreventScroll'

/**
* We want to enable scrolling on the modal background,
Expand All @@ -28,9 +28,10 @@ export function useCharcoalModalOverlay(
ref
)

usePreventScroll({
isDisabled: !state.isOpen,
})
usePreventScroll(
typeof document !== 'undefined' ? document.body : null,
state.isOpen
)

useOverlayFocusContain()

Expand Down

0 comments on commit 8d753fa

Please sign in to comment.