-
Notifications
You must be signed in to change notification settings - Fork 95
fix(NcEmojiPicker): not focusable when used in another focus trap #6558
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
Conversation
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
| created() { | ||
| // Component has its own custom focus management | ||
| // The global focus trap stack should be paused | ||
| useTrapStackControl(() => this.open) | ||
| }, |
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.
Does this work? As it probably needs to be registered in the setup method.
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.
Yes (see screenshots).
It works because lifecycle hooks have the setup context. And a getter is a valid way to provide reactive value.
created works same as setup, but with access to this.
To move it to setup we'd need to move all the reactive variables to setup. I didn't want to change components too much just to use the composable.
cf1b158 to
6476ad7
Compare
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
6476ad7 to
d607354
Compare
|
Force-pushed SPDX header, no other changes. |
susnux
left a comment
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.
fine then
|
/backport to next |
Antreesy
left a comment
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.
Tested
☑️ Resolves
NcEmojiPickernow has it's own focus trap implementation => global one must be paused (like inNcActions)NcModalhas similar thing but not the same thing. Not touching nowHow to test:
NcModalexample in vue-styleguidistcontainer=".emoji-modal"🖼️ Screenshots
🏁 Checklist
nextrequested with a Vue 3 upgrade