MDL-51983 actionmenu: fix hideIfOutside

The hideIfOutside function was being too restrictive with the
selector for checking if the event occurred within a menu child
(anchor tag) rather than the menu itself.
This commit is contained in:
Ryan Wyllie 2015-11-02 02:15:28 +00:00
parent 4456c306df
commit 5d2c5ba3e4
4 changed files with 5 additions and 5 deletions

View File

@ -421,7 +421,7 @@ ACTIONMENU.prototype = {
* @param {EventFacade} e
*/
hideIfOutside : function(e) {
if (!e.target.ancestor(SELECTOR.MENUCHILD, true)) {
if (!e.target.ancestor(SELECTOR.MENUCONTENT, true)) {
this.hideMenu(e);
}
},

File diff suppressed because one or more lines are too long

View File

@ -418,7 +418,7 @@ ACTIONMENU.prototype = {
* @param {EventFacade} e
*/
hideIfOutside : function(e) {
if (!e.target.ancestor(SELECTOR.MENUCHILD, true)) {
if (!e.target.ancestor(SELECTOR.MENUCONTENT, true)) {
this.hideMenu(e);
}
},

View File

@ -419,7 +419,7 @@ ACTIONMENU.prototype = {
* @param {EventFacade} e
*/
hideIfOutside : function(e) {
if (!e.target.ancestor(SELECTOR.MENUCHILD, true)) {
if (!e.target.ancestor(SELECTOR.MENUCONTENT, true)) {
this.hideMenu(e);
}
},