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(); }