Allow mouse interaction with the contents of a menu without closing the menu.
@@ -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
};
