mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
GUACAMOLE-723: Allow mouse interaction with the contents of a menu without closing the menu.
This commit is contained in:
@@ -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
|
||||
|
||||
};
|
||||
|
Reference in New Issue
Block a user