summaryrefslogtreecommitdiffstats
path: root/public/javascripts
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2018-04-21 12:00:22 +0000
committerGo MAEDA <maeda@farend.jp>2018-04-21 12:00:22 +0000
commita4ffda7b3714076ffd920efeeef86dd8c0e5710c (patch)
tree120e553396c7e9f17039ad397adea8057daec2e7 /public/javascripts
parent07b9ce80f6252fd028c72db382183fdfd367a4b6 (diff)
downloadredmine-a4ffda7b3714076ffd920efeeef86dd8c0e5710c.tar.gz
redmine-a4ffda7b3714076ffd920efeeef86dd8c0e5710c.zip
Use button as additional option for contextmenu (#26655).
Patch by Felix Gliesche. git-svn-id: http://svn.redmine.org/redmine/trunk@17298 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'public/javascripts')
-rw-r--r--public/javascripts/context_menu.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/public/javascripts/context_menu.js b/public/javascripts/context_menu.js
index cd2cf0884..9bc64b171 100644
--- a/public/javascripts/context_menu.js
+++ b/public/javascripts/context_menu.js
@@ -5,7 +5,7 @@ var contextMenuObserving;
function contextMenuRightClick(event) {
var target = $(event.target);
- if (target.is('a')) {return;}
+ if (target.is('a:not(.js-contextmenu)')) {return;}
var tr = target.closest('.hascontextmenu').first();
if (tr.length < 1) {return;}
event.preventDefault();
@@ -218,6 +218,7 @@ function contextMenuInit() {
if (!contextMenuObserving) {
$(document).click(contextMenuClick);
$(document).contextmenu(contextMenuRightClick);
+ $(document).on('click', '.js-contextmenu', contextMenuRightClick);
contextMenuObserving = true;
}
}