GUACAMOLE-723: Allow mouse interaction with the contents of a menu without closing the menu.

This commit is contained in:
Michael Jumper
2019-04-02 07:47:40 -07:00
parent dc012e4226
commit bd474e9761

View File

@@ -52,6 +52,14 @@ angular.module('navigation').directive('guacMenu', [function guacMenu() {
*/
var element = $element[0];
/**
* The element containing the menu contents that display when the
* menu is open.
*
* @type Element
*/
var contents = $element.find('.menu-contents')[0];
/**
* The main document object.
*
@@ -85,6 +93,11 @@ angular.module('navigation').directive('guacMenu', [function guacMenu() {
e.stopPropagation();
}, false);
// Prevent click within menu contents from toggling menu visibility
contents.addEventListener('click', function clickInsideMenuContents(e) {
e.stopPropagation();
}, false);
}] // end controller
};