Skip to content

Option to propagate mousedown event when Context Menu is shown #420

Open
@nicholassinggih

Description

@nicholassinggih

Hi Bjorn & others,

This web app I'm currently developing highlights an element on mousedown (both left and right button). If right button is down, the element under cursor will be highlighted and context menu is shown.

Problem is, once the context menu is shown, the $layer element blocks all mousedown event listeners. So, once the user right clicks on one element, when they right click on another, only the context menu is shown but the highlighting does not happen because the mousedown event isn't propagated to the proper element.

Is there a way to work around this? I've tried testing by customising the layerClick and contextmenu event handlers by commenting out the stopImmediatePropagation calls. But it didn't work, because mousedown isn't caught if the element is beneath another element.

This was tested in Chrome. Not sure about other browsers, but right now I'm focusing on Chrome and IE because my users only either use one of them.

Thanks in advance,

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