react-aria-modal icon indicating copy to clipboard operation
react-aria-modal copied to clipboard

Disable focusTrap on `AriaModal`

Open nijynot opened this issue 5 years ago • 1 comments

There's to no option to disable the focus-trap on the modal. There's the focusTrapPaused, but that only pauses it, doesn't deactivate.

nijynot avatar Nov 11 '19 14:11 nijynot

It definitely would be useful to have a way to disable the focus trap. Maybe something simple like this:

focusTrapOptions={{
  active: false
}}

or

focusTrapActive={false}

One use case is a designer mode where a preview of a modal, using react-aria-modal, is displayed on page. In this case, a focus trap would be undesirable.

UPDATE: Added a pull request.

chaddjohnson avatar Jan 06 '20 20:01 chaddjohnson