mirror of
https://github.com/nasa/openmct.git
synced 2024-12-20 13:43:09 +00:00
[Browse] Fixed clicking on menu
Previously any click on the context menu would close the context menu rather than doing the appropriate action. This is now fixed. The menu only closes when a click happens not on the menu. #33.
This commit is contained in:
parent
2b67ae42bf
commit
e3a96eff8d
@ -92,7 +92,12 @@ define(
|
||||
|
||||
// Add the menu to the body
|
||||
body.append(menu);
|
||||
|
||||
|
||||
// Stop propagation so that clicks on the menu do not close the menu
|
||||
menu.on('mousedown', function (event) {
|
||||
event.stopPropagation();
|
||||
});
|
||||
|
||||
// Dismiss the menu when body is clicked elsewhere
|
||||
// ('mousedown' because 'click' breaks left-click context menus)
|
||||
body.on('mousedown', dismiss);
|
||||
|
Loading…
Reference in New Issue
Block a user