useModalWithoutPreventScroll
function useModalWithoutPreventScroll(isOpen): object;
Alternative to useModal that does not use useModalOverlay.
Provides modal behavior (focus trapping, outside interaction blocking, dismiss handling)
without preventing scroll. This is useful on mobile Safari where usePreventScroll (used in implementation of useModalOverlay)
causes the virtual keyboard to cover focused inputs.
Parameters
| Parameter | Type |
|---|---|
isOpen | boolean |
Returns
object
| Name | Type | Default value |
|---|---|---|
ref | RefObject<HTMLDivElement | null> | - |
modalProps | DOMAttributes<FocusableElement> | overlayProps |