]> source.dussan.org Git - redmine.git/commitdiff
Merged r21738 from trunk to 5.0-stable (#37481).
authorGo MAEDA <maeda@farend.jp>
Sat, 6 Aug 2022 04:39:34 +0000 (04:39 +0000)
committerGo MAEDA <maeda@farend.jp>
Sat, 6 Aug 2022 04:39:34 +0000 (04:39 +0000)
git-svn-id: https://svn.redmine.org/redmine/branches/5.0-stable@21760 e93f8b46-1217-0410-a6f0-8f06a7374b81

public/javascripts/context_menu.js

index 0dd6ad6b9d4644ee88526a71de3007d43db2bacf..8a2bb74955ac311c2ac559cd0666da39000109a8 100644 (file)
@@ -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;
               }
             });