mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 00:20:25 +08:00 
			
		
		
		
	fix branch selector on new issue page (#14194)
fix #14185 Signed-off-by: a1012112796 <1012112796@qq.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
		@@ -111,10 +111,15 @@ function initEditForm() {
 | 
			
		||||
function initBranchSelector() {
 | 
			
		||||
  const $selectBranch = $('.ui.select-branch');
 | 
			
		||||
  const $branchMenu = $selectBranch.find('.reference-list-menu');
 | 
			
		||||
  const $isNewIssue = $branchMenu.hasClass('new-issue');
 | 
			
		||||
  $branchMenu.find('.item:not(.no-select)').click(function () {
 | 
			
		||||
    const selectedValue = $(this).data('id');
 | 
			
		||||
    const editMode = $('#editing_mode').val();
 | 
			
		||||
    $($(this).data('id-selector')).val(selectedValue);
 | 
			
		||||
    if ($isNewIssue) {
 | 
			
		||||
      $selectBranch.find('.ui .branch-name').text($(this).data('name'));
 | 
			
		||||
      return;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (editMode === 'true') {
 | 
			
		||||
      const form = $('#update_issueref_form');
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user