Skip to content

Conversation

@trueadm
Copy link
Contributor

@trueadm trueadm commented Jul 24, 2024

Fixes #11516. If we detect an action is being used, we then wrap event handlers and bindings in an event to ensure they are run in sequential order.

@changeset-bot
Copy link

changeset-bot bot commented Jul 24, 2024

🦋 Changeset detected

Latest commit: 2712ab9

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
Copy link
Member

Do we need to create a full-blown effect here, or can we just defer the task?

@trueadm
Copy link
Contributor Author

trueadm commented Jul 24, 2024

Do we need to create a full-blown effect here, or can we just defer the task?

If we don’t create an effect then it won’t be connected to the graph for teardown. So I just thought this might be simpler.

@dummdidumm
Copy link
Member

I think the effect is also important so that it runs in order, deferred microtasks are run at a different time when flushed

@Rich-Harris Rich-Harris merged commit 7a8cf3a into main Jul 24, 2024
@Rich-Harris Rich-Harris deleted the fix-ordering branch July 24, 2024 21:47
This was referenced Jul 24, 2024
dummdidumm added a commit that referenced this pull request Jul 31, 2024
fixes #12673

#12591 wrongfully applied the "wrap in effect if an action on this element" logic for `bind:this`
Rich-Harris pushed a commit that referenced this pull request Jul 31, 2024
fixes #12673

#12591 wrongfully applied the "wrap in effect if an action on this element" logic for `bind:this`
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: Actions and on: directives don't respect the order they are listed

4 participants