Skip to content

element which outside of modal can be focused in ios safari #713

Open
@Elecweb

Description

@Elecweb

Summary:

focus trap is works fine in desktop browser but it doens't work on ios safari.
In ios safari, when you focus, for example, input on modal, you can click up/down arrow to focus another input which is outside of modal.

Steps to reproduce:

  1. go to this link https://codesandbox.io/s/n5ny70m2qp on ios safari
  2. click "open Modal" button
  3. focus input on modal
  4. click up/down arrow and you'll see you still can focus on input which's not on modal

Expected behavior:

you shouldn't focus any input/element outside modal's area

Link to example of issue:

https://codesandbox.io/s/n5ny70m2qp

Additional notes:

I tried with iPhone X, iPhone 8 Plus in browserstack and real devices

safariiosfocustrap

For now, I use focus-trap-react to fixing this issue. I think react-modal already handle this job so it'd be great if it also works in ios safari

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions