Skip to content

preventDefault in onKeyDown doesn't appear to do anything #1222

Answered by fridaystreet
fridaystreet asked this question in Q&A
Discussion options

You must be logged in to vote

found a solution, would still be good to confirm the intention.

I can check event.defaultPrevented and not process my onReturn if it's already had preventDefault run. Which I'm assuming possibly is the intention. That way it still bubbles and you can decide to use the event if you want to even though it's already been processed.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by zbeyens
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant