Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Seeking Input: useHotkeys Event Propagation Challenge#1271

Unanswered
svelpari-nagarro asked this question inQ&A
Discussion options

Parent and child components both use the same shortcut (e.g., meta+backspace). I want both of these events to get trigerred.

With nativeonKeyDown events, React's event delegation ensures both handlers fire (bubbling phase)

WithuseHotkeys, complex parent operations (like modal launches) can interrupt propagation, The event loop gets occupied before child handlers execute. I am handling it temporarily by wrapping the complex operations with setTimeOut. Has anyone found a more elegant solution for this?

You must be logged in to vote

Replies: 0 comments

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Q&A
Labels
None yet
1 participant
@svelpari-nagarro

[8]ページ先頭

©2009-2025 Movatter.jp