Skip to content

Svelte 5: Actions and on: directives don't respect the order they are listed #11516

Closed
@Conduitry

Description

@Conduitry

Describe the bug

In Svelte 4, putting a use: action followed by an on: event handler on an element would first attach the action and then attach the event handler. In Svelte 5, it looks like event handlers are attached before the actions, regardless of the order they are specified on the element.

Reproduction

https://svelte-5-preview.vercel.app/#H4sIAAAAAAAACnWQQW7DIBBFr4LY2JaidE-cSF101xvUXRAYp6h4xoIhUmX57gWHJN10A_z5_DcMixydhyjVxyJRTyCVfJ1nuZP8MxcRr-AZso6UgimVPprgZj4NOPCY0LAjFHrbWiQLnViKNXARe23t2xWQ311kQAhtY7wz381OtJ04noQhjORh7-lSLTEGmipQQMmKL43WQ2i67lDQa17-Nq92--j8HzTAJXkdnrw7rn95DoX9OTFnbIqg6jMI1YY5LjW6buPfLpb47ZSL-acmsm50YKXikGD9XH8B9L2B8mQBAAA=

Logs

No response

System Info

REPL

Severity

annoyance

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions