summaryrefslogtreecommitdiffstats
path: root/public/javascripts/context_menu.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/javascripts/context_menu.js')
-rw-r--r--public/javascripts/context_menu.js8
1 files 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);
+ }
}
}
}