-
Notifications
You must be signed in to change notification settings - Fork 93
fix(NcRichContenteditable): capture and stop Esc
keydown event when closing tribute
#5353
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
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'd not add tribute-related things to the component interface. If we want to add the interface to handle autocomplete state, it could be something like autocomplite-toggle
, so we don't rely on what library we use internally.
And though it fixes the issue in Talk, it doesn't fix the initial issue.
These events were needed only to handle Escape
from NcRichContenteditable
itself ignoring it from autocomplete. A better alternative is to not trigger keydown
for Escape
from open autocomplite. Then it works in Talk without the manual handling the autocomplite state.
Seems to work with 'capturing' a keydown event and check tribute state, then close it manually |
…hen tribute is open Signed-off-by: Maksim Sukharev <[email protected]>
0a760ea
to
4762758
Compare
Esc
keydown event when closing tribute
/backport to next |
☑️ Resolves
🖼️ Screenshots
Tested against Talk (we handle Esc keyup depending whether tribute state is open or not
Before (event isn't emitted -> blur input)
Screencast.from.06.03.2024.12.57.48.webm
After (Esc doesn't blur the input)
Screencast.from.06.03.2024.12.53.54.webm
🏁 Checklist
next
requested with a Vue 3 upgrade