From 5f711a4e81431ed548179d6b0b2f76cbd7ea8602 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 22 Feb 2013 02:52:51 -0500 Subject: [PATCH] fixed the first show of menu in firefox --- ChangeLog | 2 ++ lib/client.js | 4 ++-- lib/client/terminal.js | 6 +++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 253dff14..bfce1e93 100644 --- a/ChangeLog +++ b/ChangeLog @@ -164,6 +164,8 @@ for now it's much simplier. * Fixed dblclick selection in firefox. +* Fixed the first show of menu in firefox. + 2012.12.12, Version 0.1.8 diff --git a/lib/client.js b/lib/client.js index afdbd97d..1370b081 100644 --- a/lib/client.js +++ b/lib/client.js @@ -427,8 +427,8 @@ CloudCmd._changeLinks = function(pPanelID){ if(Util.isFunction(CloudCmd.Menu) ){ CloudCmd.Menu({ - x: pEvent.x, - y: pEvent.y + x: pEvent.clientX, + y: pEvent.clientY }); /* disabling browsers menu*/ diff --git a/lib/client/terminal.js b/lib/client/terminal.js index bc05c261..42bfff37 100644 --- a/lib/client/terminal.js +++ b/lib/client/terminal.js @@ -111,17 +111,21 @@ var CloudCommander, Util, DOM, $; /* добавляем обработчик клавишь */ var lKeyHandler = function(pEvent){ - var lKEY = CloudCmd.KEY, + var lRet = true, + lKEY = CloudCmd.KEY, lKeyCode = pEvent.keyCode, lKeyBinded = KeyBinding.get(); /* если клавиши можно обрабатывать */ if(Hidden && lKeyBinded && lKeyCode === lKEY.TRA){ JqueryTerminal.show(); pEvent.preventDefault(); + lRet = false; } else if(!Hidden && lKeyCode === lKEY.ESC) JqueryTerminal.hide(); + + return lRet; }; DOM.addKeyListener(lKeyHandler);