fix(compiler-vapor): avoid delegating same-event handlers when sibling uses stop modifiers#14610
Merged
edison1105 merged 2 commits intominorfrom Mar 23, 2026
Merged
fix(compiler-vapor): avoid delegating same-event handlers when sibling uses stop modifiers#14610edison1105 merged 2 commits intominorfrom
stop modifiers#14610edison1105 merged 2 commits intominorfrom
Conversation
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
@vue/compiler-core
@vue/compiler-dom
@vue/compiler-sfc
@vue/compiler-ssr
@vue/compiler-vapor
@vue/reactivity
@vue/runtime-core
@vue/runtime-dom
@vue/runtime-vapor
@vue/server-renderer
@vue/shared
vue
@vue/compat
commit: |
Size ReportBundles
Usages
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/compiler-vapor/src/transforms/vOn.ts`:
- Around line 93-97: The current delegated decision (variable delegate computed
from arg.isStatic && !eventOptionModifiers.length &&
!nonKeyModifiers.includes('stop') && delegatedEvents(arg.content)) must be made
per-event-name across the element instead of per-handler: compute a map for the
element that marks each static event name as "delegationDisabled" if any handler
for that event contains the 'stop' modifier (or other modifiers that should
disable delegation), then replace the per-handler check
(!nonKeyModifiers.includes('stop')) with a lookup against that per-event flag
when computing delegate; locate the delegate computation inside the vOn
transform (symbols: delegate, arg, eventOptionModifiers, nonKeyModifiers,
delegatedEvents) and update it to consult the event-level map so that if any
sibling handler for the same static event has .stop, delegation is disabled for
all handlers of that event.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 80fda4bb-d825-4d05-9f97-87bedb544936
⛔ Files ignored due to path filters (1)
packages/compiler-vapor/__tests__/transforms/__snapshots__/vOn.spec.ts.snapis excluded by!**/*.snap
📒 Files selected for processing (2)
packages/compiler-vapor/__tests__/transforms/vOn.spec.tspackages/compiler-vapor/src/transforms/vOn.ts
stop modifiers
zhiyuanzmj
added a commit
to vuejs/vue-jsx-vapor
that referenced
this pull request
Mar 25, 2026
uses stop modifiers Copied from vuejs/core#14610
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.
close #14609
Summary by CodeRabbit