Skip to content

RaC Modal: add a prop to disable focus trap #7954

@ingro

Description

@ingro

Provide a general summary of the feature here

While locking the focus inside a Modal is the best overall approach and should remain the default behaviour it may create issue in particular cases, such as when other components inside the Modal creates popover or dialogs that cannot receive proper focus. In our case the problem has arisen when we tried to place a CK Editor istance inside a RaC Modal.

🤔 Expected Behavior?

If this new prop is set to true the Modal should not lock the focus within itself.

😯 Current Behavior

There are no ways to avoid this that I'm aware of at the moment.

💁 Possible Solution

I didn't find a way to implement this even using the lower level hooks like useDialog.

🔦 Context

Other libraries like MUI or ARK have provided ways to disable focus trap inside a Modal.

💻 Examples

This GIF should display the current behaviour.

Image

🧢 Your Company/Team

No response

🕷 Tracking Issue

No response

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions