From 3db747eb5ee411fa1ebbe4a5ac7f7c7339ba5803 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Sat, 4 Mar 2023 21:19:55 +0100 Subject: [PATCH] Scoped labels: don't require holding alt key to remove 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 --- web_src/js/features/repo-legacy.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/web_src/js/features/repo-legacy.js b/web_src/js/features/repo-legacy.js index 22113af169e37..5173a5b59907c 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)) {