Skip to content

Modal: neither focus nor tabbing are contained within #6579

@imageck

Description

@imageck

Prerequisites

Describe the bug

Focus and tabbing can leave the modal despite enforceFocus={true}.

Expected behavior

Focus and tabbing should be limited to the modal.

To Reproduce

  1. Create a modal with a bunch of interactive elements in it.
  2. Open a modal.
  3. Keep tabbing until the focus is on the last element.
  4. The next tab will make the focus leave the modal altogether instead of wrapping.

Reproducible Example

Any example from the documentation, e.g. live demo.

Screenshots

No response

What operating system(s) are you seeing the problem on?

Linux

What browser(s) are you seeing the problem on?

Firefox

What version of React-Bootstrap are you using?

2.7.2

What version of Bootstrap are you using?

5.3.0-alpha3

Additional context

Unreproducible with vanilla Bootstrap. There the tabbing order works as expected and is contained within the modal.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions