Keyboard events priority, propagation or bubbling #1068
Unanswered
cotepatrice
asked this question in
Q&A
Replies: 1 comment
-
@cotepatrice This is because the event bubbling does not work similar to React synthetic events - If your 1st event have a complex logic, then the event bubbling stops there. Try wrapping the complex logic in to settimeout, it will trigger in all use cases |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a global hook in my portal app that listen to 'ctrl+esc' keys. In a child component, from a shared component library, I have a form with another hook on the 'esc' key alone. I would like to know if it is possible to trap the 'ctrl+esc' key in my child component too, so both events would fire? So far, I couldn't make it work, I only have 1 of the 2 events that gets fired. Basically I would like to trap the keyboard event from the 'esc' in my component (which check if the form is dirty before closing) and then, the one from the 'ctrl+esc' in my main app.
Beta Was this translation helpful? Give feedback.
All reactions