-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(NcActions): intercept into current focus trap stack #4953
fix(NcActions): intercept into current focus trap stack #4953
Conversation
9463ffc
to
234bec9
Compare
234bec9
to
7f8fa2d
Compare
Could be risky. A good review is appreciated 👀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cannot reproduce. The On what page what it is recorded? |
The issue happens when there are any inline actions. They are also counted in menu actions when determining what kind of menu we have. Preparing another PR. |
7f8fa2d
to
3297d51
Compare
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
3297d51
to
6060690
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
works, great!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
works
☑️ Resolves
NcActions
doesn't work inside an element with a focus trap in a general case #4910When the component has its own focus trap, then it is managed by global trap stack by focus-trap.
However if the component has no focus trap and is used inside another focus trap - there is an issue. By default popover content is rendered in body or other container, which is likely outside the current focus trap containers. It results in broken behavior from focus-trap.
We need to pause all the focus traps for opening popover and then unpause them back after closing.
🖼️ Screenshots
Focus trap still works.
Supports multi-level focus traps (header menu focus trap inside sidebar trap):
🏁 Checklist