mirror of
				https://github.com/go-gitea/gitea
				synced 2025-10-31 03:18:24 +00:00 
			
		
		
		
	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>
This commit is contained in:
		
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							e0800133dc
						
					
				
				
					commit
					68d7d772eb
				
			| @@ -145,7 +145,6 @@ export function initRepoCommentForm() { | |||||||
|  |  | ||||||
|       const clickedItem = $(this); |       const clickedItem = $(this); | ||||||
|       const scope = $(this).attr('data-scope'); |       const scope = $(this).attr('data-scope'); | ||||||
|       const canRemoveScope = e.altKey; |  | ||||||
|  |  | ||||||
|       $(this).parent().find('.item').each(function () { |       $(this).parent().find('.item').each(function () { | ||||||
|         if (scope) { |         if (scope) { | ||||||
| @@ -153,11 +152,7 @@ export function initRepoCommentForm() { | |||||||
|           if ($(this).attr('data-scope') !== scope) { |           if ($(this).attr('data-scope') !== scope) { | ||||||
|             return true; |             return true; | ||||||
|           } |           } | ||||||
|           if ($(this).is(clickedItem)) { |           if (!$(this).is(clickedItem) && !$(this).hasClass('checked')) { | ||||||
|             if (!canRemoveScope && $(this).hasClass('checked')) { |  | ||||||
|               return true; |  | ||||||
|             } |  | ||||||
|           } else if (!$(this).hasClass('checked')) { |  | ||||||
|             return true; |             return true; | ||||||
|           } |           } | ||||||
|         } else if (!$(this).is(clickedItem)) { |         } else if (!$(this).is(clickedItem)) { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user