From 46af060a3708c2d213e550a2d7482cdf56a92e9c Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Wed, 17 Nov 2010 15:52:08 +0000 Subject: [PATCH] Don't display the menu when the anchor is disabled --- public/javascripts/menu.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/public/javascripts/menu.js b/public/javascripts/menu.js index d4e8bb65a..9f88f0e0c 100644 --- a/public/javascripts/menu.js +++ b/public/javascripts/menu.js @@ -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); + } } } -- 2.39.5