aboutsummaryrefslogtreecommitdiff
path: root/web_src
diff options
context:
space:
mode:
authorBrecht Van Lommel2023-03-06 11:20:29 +0100
committerGitHub2023-03-06 18:20:29 +0800
commit68d7d772eb24dea258db01fe19d6042e07b223f9 (patch)
treee973538203613eb82ad42a29f74b2798550803a9 /web_src
parente0800133dc1c2cf90cef08e5bcf7e64a4b71c443 (diff)
Scoped labels: don't require holding alt key to remove (#23303)
Alt doesn't work on all browsers, the simplest solution for v1.19 is to just not require it and toggle the label by just clicking. Part of #22974 Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'web_src')
-rw-r--r--web_src/js/features/repo-legacy.js7
1 files changed, 1 insertions, 6 deletions
diff --git a/web_src/js/features/repo-legacy.js b/web_src/js/features/repo-legacy.js
index 22113af16..5173a5b59 100644
--- a/web_src/js/features/repo-legacy.js
+++ b/web_src/js/features/repo-legacy.js
@@ -145,7 +145,6 @@ export function initRepoCommentForm() {
const clickedItem = $(this);
const scope = $(this).attr('data-scope');
- const canRemoveScope = e.altKey;
$(this).parent().find('.item').each(function () {
if (scope) {
@@ -153,11 +152,7 @@ export function initRepoCommentForm() {
if ($(this).attr('data-scope') !== scope) {
return true;
}
- if ($(this).is(clickedItem)) {
- if (!canRemoveScope && $(this).hasClass('checked')) {
- return true;
- }
- } else if (!$(this).hasClass('checked')) {
+ if (!$(this).is(clickedItem) && !$(this).hasClass('checked')) {
return true;
}
} else if (!$(this).is(clickedItem)) {