diff --git a/lib/client/keyBinding.js b/lib/client/keyBinding.js index 4d123ff1..e0a59586 100644 --- a/lib/client/keyBinding.js +++ b/lib/client/keyBinding.js @@ -23,10 +23,16 @@ CloudCommander.KEY = { F10 : 121 }; -CloudCommander.mouseBinding = (function(){ - document.oncontextmenu = function(){ +CloudCommander.mouseBinding = (function(pElement){ + var isElement = pElement ? true : false; + if(pElement){ + pElement = document; + } + pElement.oncontextmenu = function(){ if(typeof CloudCommander.Menu === 'function') CloudCommander.Menu(); + else if(isElement) + CloudCommander.Menu.show(); } })