Skip to content

Commit 68d7d77

Browse files
brechtvllafrikslunny
authored
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>
1 parent e080013 commit 68d7d77

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

Diff for: web_src/js/features/repo-legacy.js

+1-6
Original file line numberDiff line numberDiff line change
@@ -145,19 +145,14 @@ export function initRepoCommentForm() {
145145

146146
const clickedItem = $(this);
147147
const scope = $(this).attr('data-scope');
148-
const canRemoveScope = e.altKey;
149148

150149
$(this).parent().find('.item').each(function () {
151150
if (scope) {
152151
// Enable only clicked item for scoped labels
153152
if ($(this).attr('data-scope') !== scope) {
154153
return true;
155154
}
156-
if ($(this).is(clickedItem)) {
157-
if (!canRemoveScope && $(this).hasClass('checked')) {
158-
return true;
159-
}
160-
} else if (!$(this).hasClass('checked')) {
155+
if (!$(this).is(clickedItem) && !$(this).hasClass('checked')) {
161156
return true;
162157
}
163158
} else if (!$(this).is(clickedItem)) {

0 commit comments

Comments
 (0)