mirror of
				https://github.com/go-gitea/gitea
				synced 2025-10-31 19:38:23 +00:00 
			
		
		
		
	| @@ -1,5 +1,5 @@ | ||||
| export function handleGlobalEnterQuickSubmit(target) { | ||||
|   const form = target.closest('form'); | ||||
|   let form = target.closest('form'); | ||||
|   if (form) { | ||||
|     if (!form.checkValidity()) { | ||||
|       form.reportValidity(); | ||||
| @@ -9,5 +9,10 @@ export function handleGlobalEnterQuickSubmit(target) { | ||||
|     // 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; | ||||
|   } | ||||
|   form = target.closest('.ui.form'); | ||||
|   if (form) { | ||||
|     form.querySelector('.ui.primary.button')?.click(); | ||||
|   } | ||||
| } | ||||
|   | ||||
| @@ -162,8 +162,8 @@ async function onEditContent(event) { | ||||
|     editContentZone.innerHTML = document.getElementById('issue-comment-editor-template').innerHTML; | ||||
|     comboMarkdownEditor = await initComboMarkdownEditor(editContentZone.querySelector('.combo-markdown-editor')); | ||||
|     comboMarkdownEditor.attachedDropzoneInst = await setupDropzone(editContentZone.querySelector('.dropzone')); | ||||
|     editContentZone.querySelector('.cancel.button').addEventListener('click', cancelAndReset); | ||||
|     editContentZone.querySelector('.save.button').addEventListener('click', saveAndRefresh); | ||||
|     editContentZone.querySelector('.ui.cancel.button').addEventListener('click', cancelAndReset); | ||||
|     editContentZone.querySelector('.ui.primary.button').addEventListener('click', saveAndRefresh); | ||||
|   } | ||||
|  | ||||
|   // Show write/preview tab and copy raw content as needed | ||||
|   | ||||
		Reference in New Issue
	
	Block a user