Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: improve event handling compatibility with delegation #10168

Merged
merged 4 commits into from
Jan 12, 2024

Conversation

trueadm
Copy link
Contributor

@trueadm trueadm commented Jan 12, 2024

Fixes #10165

Copy link

changeset-bot bot commented Jan 12, 2024

🦋 Changeset detected

Latest commit: e34d2e9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
svelte Patch

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

Copy link

vercel bot commented Jan 12, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
svelte-5-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 12, 2024 1:57pm

@dummdidumm
Copy link
Member

Rather than continuing down this rabbit hole of edge cases I think we should greatly simplify this instead: #10169 IIRC we discussed doing this before and agreed.

@trueadm
Copy link
Contributor Author

trueadm commented Jan 12, 2024

@dummdidumm I don't feel like they're related? This isn't a rabbit hole but a genuine bug in the event system that was in the original system prototype but got lost along the way. Otherwise this would break:

<div on:click={() => console.log('foo')}
  <div onclick={e => e.stopPropagation()}>
  </div>
</div>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Svelte 5: adding use:action to an element breaks event.stopPropagation()
2 participants