mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-26 12:27:06 +00:00 
			
		
		
		
	Fix issue/PR title edit (#30858)
1. "enter" doesn't work (I think it is the last enter support for #14843) 2. if a branch name contains something like `&`, then the branch selector doesn't update
This commit is contained in:
		| @@ -3,16 +3,17 @@ export function handleGlobalEnterQuickSubmit(target) { | ||||
|   if (form) { | ||||
|     if (!form.checkValidity()) { | ||||
|       form.reportValidity(); | ||||
|       return; | ||||
|     } else { | ||||
|       // here use the event to trigger the submit event (instead of calling `submit()` method directly) | ||||
|       // otherwise the `areYouSure` handler won't be executed, then there will be an annoying "confirm to leave" dialog | ||||
|       form.dispatchEvent(new SubmitEvent('submit', {bubbles: true, cancelable: true})); | ||||
|     } | ||||
|  | ||||
|     // here use the event to trigger the submit event (instead of calling `submit()` method directly) | ||||
|     // otherwise the `areYouSure` handler won't be executed, then there will be an annoying "confirm to leave" dialog | ||||
|     form.dispatchEvent(new SubmitEvent('submit', {bubbles: true, cancelable: true})); | ||||
|     return; | ||||
|     return true; | ||||
|   } | ||||
|   form = target.closest('.ui.form'); | ||||
|   if (form) { | ||||
|     form.querySelector('.ui.primary.button')?.click(); | ||||
|     return true; | ||||
|   } | ||||
|   return false; | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 wxiaoguang
					wxiaoguang