Skip to content

Layer passthrough event has wrong .target #631

Open
@corwin-of-amber

Description

@corwin-of-amber

To allow closing the menu when clicking outside, jQuery-contextMenu puts a helper layer on top of the document. When it's clicked, jQuery-contextMenu cleverly sends the mouse event to the element right beneath it to mimic what would happen if the layer was not there. This may address some of the concerns raised by #532.

One flaw, though, is that the 'target' property of the event is the layer, not the delegated element. This can easily be fixed by adding e.target = target here. (Not making a push request since the change is so small.)

I tried changing e.originalEvent.target as well, but unfortunately it had no effect.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions