sveltejs / svelte

Cybernetically enhanced web apps
https://svelte.dev
MIT License
78.18k stars 4.09k forks source link

Apply directives in order #2446

Closed Rich-Harris closed 4 years ago

Rich-Harris commented 5 years ago

Currently, on:input event handlers are applied before any event handlers from actions or bindings, regardless of the order in which they're declared. This makes certain tasks (such as input masking) overly difficult.

Demos (which behave differently between Chrome and Firefox):

A solution would be to consistently apply directives in the order in which they're declared. It'll require some rejiggering though.

Conduitry commented 4 years ago

Re-opening this. The second example works well (for me, in Firefox) now in 3.16.6 - but the first one isn't. I'm still getting lower-case letters. The action works properly if the bind: is removed. Do we also need to update how we're applying actions? cc @tanhauhau