From dcff1393fb8a3d8c63f9f26b1cf06ded8e21e356 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Wed, 15 Aug 2012 11:11:23 +0300 Subject: [PATCH] Update lib/client/keyBinding.js --- lib/client/keyBinding.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/client/keyBinding.js b/lib/client/keyBinding.js index dcb79508..460dacbc 100644 --- a/lib/client/keyBinding.js +++ b/lib/client/keyBinding.js @@ -24,8 +24,15 @@ CloudCommander.KEY = { }; CloudCommander.mouseBinding = (function(pEvent){ - if(typeof CloudCommander.Menu === 'function') - CloudCommander.Menu({pEvent.x, pEvent.y}); + if(typeof CloudCommander.Menu === 'function'){ + var lPosition = {0,0} + if(pEvent && pEvent.x && pEvent.y){ + var lX = pEvent.x; + var lY = pEvent.y; + lPosition = {lX, lY} + } + CloudCommander.Menu(lPosition); + } }) CloudCommander.keyBinding = (function(){