From 3b4292d9971dd216281b9cfe02899f999f862ac4 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Thu, 25 Mar 2010 13:41:55 +0000 Subject: themes/base: allow closing menus by clicking into the body (#97) --- themes/base/htdocs/luci-static/resources/Dropdowns.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'themes/base') diff --git a/themes/base/htdocs/luci-static/resources/Dropdowns.js b/themes/base/htdocs/luci-static/resources/Dropdowns.js index 8c07a6f2f..a8d12b959 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()) { -- cgit v1.2.3