Skip to content

Svelte 5: Event delegation thoughts #9714

@dummdidumm

Description

@dummdidumm

Describe the problem

#9696 uncovered a major flaw in our event delegation logic: If an event is stopped from being propagated, and that event is delegated, then the propagation isn't really stopped. If there's now another event handler for the same event type above that delegated listener but below the root that listens to the delegated events, and that event handler is not delegated, then it will still get notified of the event.

Describe the proposed solution

I'm honestly not sure if we can fix this in a sensible way that covers all cases, at least not as long as we have on:x still around.

Alternatives considered

Live with the edge cases of this sometimes not working correctly

Importance

would make my life easier

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions