diff options
author | Go MAEDA <maeda@farend.jp> | 2022-07-27 13:30:11 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2022-07-27 13:30:11 +0000 |
commit | 15dcf9553eb5ca6672ddb79eb40263a27649c79b (patch) | |
tree | a2ae8fb712513984bc24674caf74d33526fd773a /public | |
parent | 3164895f6995d4255e9ed4c64c25ac07fdc5dd8f (diff) | |
download | redmine-15dcf9553eb5ca6672ddb79eb40263a27649c79b.tar.gz redmine-15dcf9553eb5ca6672ddb79eb40263a27649c79b.zip |
Fix the unintentional selection of rows with the context menu (#37481).
Patch by Takashi Kato.
git-svn-id: https://svn.redmine.org/redmine/trunk@21738 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'public')
-rw-r--r-- | public/javascripts/context_menu.js | 5 |
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; } }); |