mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 14:03:52 +01:00
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:
parent
4456c306df
commit
5d2c5ba3e4
@ -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
@ -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);
|
||||
}
|
||||
},
|
||||
|
2
lib/yui/src/actionmenu/js/actionmenu.js
vendored
2
lib/yui/src/actionmenu/js/actionmenu.js
vendored
@ -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);
|
||||
}
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user