Skip to content

Delegate longpress #3

@timovanderzanden

Description

@timovanderzanden

Currently there doesn't seem to be a way to delegate the longpress, so it doesn't work when binding future elements.

As a temporary workaround I have added a selector variable to the function. So my event handlers are as follow:

$this.on('mousedown', selector, mousedown_callback);
$this.on('mouseup', selector, mouseup_callback);
$this.on('mousemove', selector, move_callback);

Where $this refers to a parent object or document and selector to the pressable element itself. This works, but I don't know if this would be the best approach.

PS. Thank you for the mousemove fix!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions