Update lib/client/menu.js

This commit is contained in:
coderaiser 2012-08-15 14:14:18 +03:00
parent 9ac68f9bfa
commit e43da5293e

View file

@ -91,7 +91,10 @@ CloudCommander.Menu.set = (function(){
document.onclick = function(pEvent){
if(pEvent.x && pEvent.y){
var lLayer = lThis.getById('context-menu-layer')
var lStyle = lLayer.style.cssText;
var lStyle;
if(lLayer)
lStyle = lLayer.style.cssText;
/* hide invisible menu layer */
if(lStyle)
lLayer.style.cssText = lStyle
@ -107,7 +110,7 @@ CloudCommander.Menu.set = (function(){
.parentElement);
/* show invisible menu layer */
if(lStyle)
if(lLayer && lStyle)
lLayer.style.cssText = lStyle;
/* if document.onclick was set up