]> source.dussan.org Git - redmine.git/commitdiff
Unselect issues when clicking outside of the list.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Thu, 4 Mar 2010 19:09:14 +0000 (19:09 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Thu, 4 Mar 2010 19:09:14 +0000 (19:09 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3544 e93f8b46-1217-0410-a6f0-8f06a7374b81

public/javascripts/context_menu.js

index 04b65798ea2470b87a609014fb1636e83b137ec7..dc18e0af1ec2f75de9dceefa4b2f5650b48f620d 100644 (file)
@@ -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);
+          }
         }
       }
     }