Skip to content

Feature request: event handlers with only modifiers, e.g. on:click|stopPropagation #3049

@ghost

Description

stopPropagation can be useful on its own, as a way of catching "cancel when user clicks away" functionality and preventing it from being triggered by clicks that originate within the focused thing itself.

It would be nice to be able to use the event modifier without having to supply a "noop" handler, e.g.

<div on:click|stopPropagation>
    ...
</div>

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