Don't display the menu when the anchor is disabled
This commit is contained in:
parent
918dd5679f
commit
46af060a37
1 changed files with 7 additions and 5 deletions
|
@ -14,12 +14,14 @@ function openMenu(anchor, menu) {
|
|||
* Callback called when the mouse enters a menu anchor.
|
||||
*/
|
||||
function enterMenuAnchor(event, anchor, menu, delay) {
|
||||
clearTimeout(menu.timer);
|
||||
if (!anchor.hasClassName("disabled")) {
|
||||
clearTimeout(menu.timer);
|
||||
|
||||
if (delay > 0) {
|
||||
menu.timer = setTimeout(function () { openMenu(anchor, menu) }, delay);
|
||||
} else {
|
||||
openMenu(event, menu);
|
||||
if (delay > 0) {
|
||||
menu.timer = setTimeout(function () { openMenu(anchor, menu) }, delay);
|
||||
} else {
|
||||
openMenu(event, menu);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue