summaryrefslogtreecommitdiffstats
path: root/public/javascripts
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2022-08-06 04:39:34 +0000
committerGo MAEDA <maeda@farend.jp>2022-08-06 04:39:34 +0000
commit827239000a20c5190074f04451c41308d28faf4e (patch)
tree8e365d70002dd759e992e47016c88ae19a31d69a /public/javascripts
parentdd1e8c6c39c6cc109694d8609a8318e51becefc6 (diff)
downloadredmine-827239000a20c5190074f04451c41308d28faf4e.tar.gz
redmine-827239000a20c5190074f04451c41308d28faf4e.zip
Merged r21738 from trunk to 5.0-stable (#37481).
git-svn-id: https://svn.redmine.org/redmine/branches/5.0-stable@21760 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'public/javascripts')
-rw-r--r--public/javascripts/context_menu.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/public/javascripts/context_menu.js b/public/javascripts/context_menu.js
index 0dd6ad6b9..8a2bb7495 100644
--- a/public/javascripts/context_menu.js
+++ b/public/javascripts/context_menu.js
@@ -52,11 +52,12 @@ function contextMenuClick(event) {
if (lastSelected.length) {
var toggling = false;
$('.hascontextmenu').each(function(){
- if (toggling || $(this).is(tr)) {
+ $elm = $(this)
+ if (!$elm.is(lastSelected) && (toggling || $elm.is(tr))) {
contextMenuAddSelection($(this));
contextMenuClearDocumentSelection();
}
- if ($(this).is(tr) || $(this).is(lastSelected)) {
+ if ($elm.is(lastSelected) !== $elm.is(tr)) {
toggling = !toggling;
}
});