From 69769e1dfde5194edda2b8afafc7bbfc5ece247e Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 4 Mar 2010 19:09:14 +0000 Subject: [PATCH] Unselect issues when clicking outside of the list. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3544 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- public/javascripts/context_menu.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/public/javascripts/context_menu.js b/public/javascripts/context_menu.js index 04b65798e..dc18e0af1 100644 --- a/public/javascripts/context_menu.js +++ b/public/javascripts/context_menu.js @@ -79,8 +79,12 @@ ContextMenu.prototype = { } else { // click is outside the rows var t = Event.findElement(e, 'a'); - if ((t != document) && (Element.hasClassName(t, 'disabled') || Element.hasClassName(t, 'submenu'))) { - Event.stop(e); + if (t == document || t == undefined) { + this.unselectAll(); + } else { + if (Element.hasClassName(t, 'disabled') || Element.hasClassName(t, 'submenu')) { + Event.stop(e); + } } } }