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: ensure spread attribute events are attached synchronously #14387

Merged
merged 4 commits into from
Nov 21, 2024

Conversation

trueadm
Copy link
Contributor

@trueadm trueadm commented Nov 21, 2024

Fixes #14385. Interestingly, it seems the tests in #11230 still pass here so I assume that we've fixed this issue through some other changes in the codebase since.

@Rich-Harris
Copy link
Member

preview: https://svelte-dev-git-preview-svelte-14387-svelte.vercel.app/

this is an automated message

Copy link
Contributor

Playground

pnpm add https://pkg.pr.new/svelte@14387

@dummdidumm
Copy link
Member

It works because input and change events are both delegated now. It will break on bindings that have listeners that are not delegated, like bind:paused: works on main, but breaks in this PR. That said, it already did not work for bindings combined with events that aren't delegated in the case of not spreading (example) which is arguably more common. So I think I'm still ok with this change.
Thoughts?

@trueadm
Copy link
Contributor Author

trueadm commented Nov 21, 2024

So I think I'm still ok with this change. Thoughts?

I agree with you here.

@Rich-Harris
Copy link
Member

I think I'm still ok with this change.

same. if it causes problems we can try and revisit it in a way that works for both spread and non-spread

Copy link

changeset-bot bot commented Nov 21, 2024

🦋 Changeset detected

Latest commit: 33b5434

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

@Rich-Harris Rich-Harris merged commit dd9abea into main Nov 21, 2024
11 checks passed
@Rich-Harris Rich-Harris deleted the fix-attr-spread-event branch November 21, 2024 16:40
@github-actions github-actions bot mentioned this pull request Nov 21, 2024
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.

Bug: onfocus is not called when focused in an action
3 participants