]> source.dussan.org Git - redmine.git/commitdiff
Cannot select text in a table with a context menu available (#36363).
authorGo MAEDA <maeda@farend.jp>
Fri, 31 Dec 2021 00:47:41 +0000 (00:47 +0000)
committerGo MAEDA <maeda@farend.jp>
Fri, 31 Dec 2021 00:47:41 +0000 (00:47 +0000)
Patch by Mizuki ISHIKAWA.

git-svn-id: http://svn.redmine.org/redmine/trunk@21334 e93f8b46-1217-0410-a6f0-8f06a7374b81

public/javascripts/context_menu.js

index 504c9cbc6c59f58cf3c0e76f091698541a33dc2f..55d77bd77fd6838173e7ee3043f908a264334297 100644 (file)
@@ -46,6 +46,7 @@ function contextMenuClick(event) {
       } else {
         if (event.ctrlKey || event.metaKey) {
           contextMenuToggleSelection(tr);
+          contextMenuClearDocumentSelection();
         } else if (event.shiftKey) {
           lastSelected = contextMenuLastSelected();
           if (lastSelected.length) {
@@ -53,6 +54,7 @@ function contextMenuClick(event) {
             $('.hascontextmenu').each(function(){
               if (toggling || $(this).is(tr)) {
                 contextMenuAddSelection($(this));
+                contextMenuClearDocumentSelection();
               }
               if ($(this).is(tr) || $(this).is(lastSelected)) {
                 toggling = !toggling;
@@ -191,7 +193,6 @@ function contextMenuToggleSelection(tr) {
 function contextMenuAddSelection(tr) {
   tr.addClass('context-menu-selection');
   contextMenuCheckSelectionBox(tr, true);
-  contextMenuClearDocumentSelection();
 }
 
 function contextMenuRemoveSelection(tr) {