Update lib/client/keyBinding.js

This commit is contained in:
coderaiser 2012-08-14 17:36:56 +03:00
parent 9d8197e34c
commit 8b6fc2583a

View file

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