From 1b25a177f11861cb9bfc54cfffe57caeb1ad60f0 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Wed, 15 Aug 2012 13:59:53 +0300 Subject: [PATCH] Update lib/client/menu.js --- lib/client/menu.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/client/menu.js b/lib/client/menu.js index 1c67b39e..28639102 100644 --- a/lib/client/menu.js +++ b/lib/client/menu.js @@ -78,6 +78,12 @@ CloudCommander.Menu.set = (function(){ var lFunc_f = document.onclick; document.onclick = function(pEvent){ if(pEvent.x && pEvent.y){ + var lLayer = lThis.getById('context-menu-layer') + /* hide invisible menu layer */ + lLayer.style.cssText = lLayer.style.cssText + .replace('z-index: 1', 'z-index:-1') + + /* get element by point */ var lElement = document.elementFromPoint(pEvent.x, pEvent.y) if (lElement.tagName === 'A') lThis.setCurrentFile(lElement @@ -86,6 +92,10 @@ CloudCommander.Menu.set = (function(){ lThis.setCurrentFile(lElement .parentElement); + /* show invisible menu layer */ + lLayer.style.cssText = lLayer.style.cssText + .replace('z-index: -1', 'z-index: 1') + if(typeof lFunc_f === 'function') lFunc_f(); }