Skip to content

contextmenu click on second element shows and immediately hides the menu #585

@jwschram

Description

@jwschram

I'm using the menu in conjunction with vis.js Timelines and it's causing an interesting edge case. Here's a demo to see the issue in action. The demo is divided into a simple list at the top of the page, and a series of vis.js Timelines at the bottom.

Both lists are using the selector option to delegate handler functions.

If you right-click from one item to another in the top list it works just fine, however, if you right-click from one Timeline to another you will eventually cause a case in which the menu will open and then immediately close again. This will also break the top menu.

I looked briefly at the code and it looks like the menu is designed to close its previous instances when a new contextmenu event is fired, however, in this case it's closing the menu that was just opened.

If you have any suggestions for a workaround or a fix I would appreciate it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions