fix(useMagicKeys): handle empty key events to prevent errors#5149
Merged
antfu merged 2 commits intovueuse:mainfrom Nov 26, 2025
Merged
fix(useMagicKeys): handle empty key events to prevent errors#5149antfu merged 2 commits intovueuse:mainfrom
antfu merged 2 commits intovueuse:mainfrom
Conversation
@vueuse/components
@vueuse/core
@vueuse/electron
@vueuse/firebase
@vueuse/integrations
@vueuse/math
@vueuse/metadata
@vueuse/nuxt
@vueuse/router
@vueuse/rxjs
@vueuse/shared
commit: |
OrbisK
approved these changes
Nov 5, 2025
43081j
approved these changes
Nov 18, 2025
9romise
reviewed
Nov 18, 2025
Member
There was a problem hiding this comment.
I noticed that the KeyboardEvent in the issue was manually dispatched.
Just out of curiosity — does the browser ever dispatch identical KeyboardEvent instances without parameters in certain situations? If not, should we handle this edge case in our codebase rather than expecting users to avoid dispatching such empty events?
I know this is a tiny change, but I'm just wondering — should this really fall under our scope?
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5149 +/- ##
=======================================
Coverage 63.95% 63.96%
=======================================
Files 343 343
Lines 7838 7840 +2
Branches 2424 2425 +1
=======================================
+ Hits 5013 5015 +2
Misses 2286 2286
Partials 539 539 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
antfu
approved these changes
Nov 26, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before submitting the PR, please make sure you do the following
fixes #123).Description
fixes #5148
Additional context