Skip to content

Commit

Permalink
MDL-51983 actionmenu: fix hideIfOutside
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ryanwyllie committed Nov 4, 2015
1 parent 4456c30 commit 5d2c5ba
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
},
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
},
Expand Down
2 changes: 1 addition & 1 deletion lib/yui/src/actionmenu/js/actionmenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
},
Expand Down

0 comments on commit 5d2c5ba

Please sign in to comment.