From 100ba73af08ef6468eb84dcd2367845bb0b04db9 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Wed, 20 Feb 2013 06:47:57 -0500 Subject: [PATCH] fixed bug with getting showed menu in firefox --- ChangeLog | 2 ++ lib/client/menu.js | 2 +- lib/client/menu/contextMenu.js | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9827acbe..5e48f052 100644 --- a/ChangeLog +++ b/ChangeLog @@ -155,6 +155,8 @@ for reading. * Updated jquery jQuery-contextMenu to v1.6.5. +* Fixed bug with getting showed menu in firefox. + 2012.12.12, Version 0.1.8 diff --git a/lib/client/menu.js b/lib/client/menu.js index 4d050f54..bac9314f 100644 --- a/lib/client/menu.js +++ b/lib/client/menu.js @@ -288,7 +288,7 @@ var CloudCommander, Util, DOM, $; DOM.Images.hideLoad(); if(Position && !Position.x ) - Position = null; + Position = undefined; $('li').contextMenu(Position); }; diff --git a/lib/client/menu/contextMenu.js b/lib/client/menu/contextMenu.js index a903e822..779c3bee 100644 --- a/lib/client/menu/contextMenu.js +++ b/lib/client/menu/contextMenu.js @@ -1217,7 +1217,7 @@ function splitAccesskey(val) { // handle contextMenu triggers $.fn.contextMenu = function(operation) { - if (operation === undefined) { + if (!operation) { this.first().trigger('contextmenu'); } else if (operation.x && operation.y) { this.first().trigger($.Event("contextmenu", {pageX: operation.x, pageY: operation.y}));