Conversation
Thanks for opening this pull request! 🎉We really appreciate you taking the time to contribute, @lazerg. A maintainer will take a look as soon as they can. In the meantime, please make sure that:
If anything needs adjusting we'll leave comments here. Thanks again! |
Automation signalsActivity patterns show signs of automation. Evidence
Last 5 PRs: This is an automated analysis by AgentScan |
@vueuse/components
@vueuse/core
@vueuse/electron
@vueuse/firebase
@vueuse/integrations
@vueuse/math
@vueuse/metadata
@vueuse/nuxt
@vueuse/router
@vueuse/rxjs
@vueuse/shared
@vueuse/skills
commit: |
Contributor
Author
|
This pipeline failure predates my change and isn't caused by it. It's the known flaky useTransition animation-timing test, unrelated to onKeyStroke. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5621 +/- ##
=======================================
Coverage 69.09% 69.09%
=======================================
Files 351 351
Lines 8355 8355
Branches 2542 2554 +12
=======================================
Hits 5773 5773
Misses 2110 2110
Partials 472 472 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
onKeyStroke passed the passive boolean straight through as useEventListener's options argument, and addEventListener treats a boolean there as useCapture, not passive. So passive: true silently turned the listener into a capture-phase one, letting it run before a descendant's own handler had a chance to call stopPropagation().
Wrapped it as { passive } so the browser reads it as the intended passive option and the listener stays in the default bubble phase. onKeyStroke doesn't expose any other listener option (no capture, once, etc.), so there's nothing else to forward here.
One side effect worth flagging: since passive listeners can't call preventDefault(), any handler that relied on the old (buggy) capture-mode listener actually running preventDefault() will now find it's a no-op, which is the correct passive contract but a behavior change from before.
Fixes #5620