fix(qwik): honor stopPropagation() from a deferred event handler - #8752
Merged
Conversation
# What is it? - Bug # Description qwikloader walks the event path synchronously and collects one task list per element, then flushes them. A handler whose QRL is still importing can only call stopPropagation() after that walk moved on, so ancestor handlers on the bubbling path ran anyway. runEventTasks now re-checks cancelBubble between per-element task groups, so a deferred stop still skips later elements; a synchronous stop truncates the walk as before.
🦋 Changeset detectedLatest commit: 3d90cf7 The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
maiieul
added a commit
that referenced
this pull request
Jun 20, 2026
The qwikloader runEventTasks/taskGroups change is unrelated to ErrorBoundary; extracted to #8752 so this PR is ErrorBoundary-only.
@qwik.dev/core
@qwik.dev/router
eslint-plugin-qwik
create-qwik
@qwik.dev/optimizer
commit: |
Contributor
built with Refined Cloudflare Pages Action⚡ Cloudflare Pages Deployment
|
Member
|
I dont understand it, thats why we have stoppropagation:*, no? |
wmertens
added a commit
that referenced
this pull request
Jun 21, 2026
intellix
pushed a commit
to intellix/qwik
that referenced
this pull request
Jun 25, 2026
`ev.stopPropagation()` and `ev.preventDefault()` are synchronous APIs and should not be used to steer async handling. Use shared state instead.
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.

What is it?
Description
Split out of #8745 (it is unrelated to ErrorBoundary).
qwikloader walks the event path synchronously and collects one task list per element, then flushes them. A handler whose QRL is still importing can only call
stopPropagation()after that walk has already moved on, so ancestor handlers on the bubbling path ran anyway.runEventTasksnow re-checkscancelBubblebetween per-element task groups, so a deferred stop still skips later elements; a synchronous stop truncates the walk as before. Covered by newqwikloader.behavior.unit.tscases (bubble + capture phase); the brotli budget bump reflects the added logic.