From 5c4cd1485d4303e8fbdd97a5b32273d8367e5eba Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Fri, 3 Nov 2023 00:27:37 +0100 Subject: Close popup menus if opening another. --- public/common/client.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'public') diff --git a/public/common/client.js b/public/common/client.js index 9bbb74f..cf00c33 100644 --- a/public/common/client.js +++ b/public/common/client.js @@ -792,9 +792,9 @@ function close_menus(self) { node.removeAttribute("open") } +/* close menu if opening another */ for (let node of document.querySelectorAll("#toolbar > details")) { - //node.onclick = function () { close_menus(node) } - //node.onmouseleave = function () { node.removeAttribute("open") } + node.onclick = function () { close_menus(node) } } /* close menu after selecting something */ -- cgit v1.2.3