summaryrefslogtreecommitdiffhomepage
path: root/themes/base
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2010-03-25 13:41:55 +0000
committerJo-Philipp Wich <jow@openwrt.org>2010-03-25 13:41:55 +0000
commit3b4292d9971dd216281b9cfe02899f999f862ac4 (patch)
treede9fe8de6eb06840e1a3e22372ce22d4c3e9e64a /themes/base
parent2b726957366b83a118469151f5704c524f2f1914 (diff)
themes/base: allow closing menus by clicking into the body (#97)
Diffstat (limited to 'themes/base')
-rw-r--r--themes/base/htdocs/luci-static/resources/Dropdowns.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/themes/base/htdocs/luci-static/resources/Dropdowns.js b/themes/base/htdocs/luci-static/resources/Dropdowns.js
index 8c07a6f2fc..a8d12b959c 100644
--- a/themes/base/htdocs/luci-static/resources/Dropdowns.js
+++ b/themes/base/htdocs/luci-static/resources/Dropdowns.js
@@ -187,6 +187,14 @@ function initDropdowns() {
}
}
}
+
+ XHTML1.addEventListener(document, "click", function() {
+ if (delayHideTimerId) {
+ clearTimeout(delayHideTimerId);
+ delayHideTimerId = 0;
+ delayHide();
+ }
+ });
}
if(XHTML1.isDOMSupported()) {