File tree Expand file tree Collapse file tree 4 files changed +13
-8
lines changed Expand file tree Collapse file tree 4 files changed +13
-8
lines changed Original file line number Diff line number Diff line change 235235
236236 {{if and (not $.Repository.IsArchived) (not .DiffNotAvailable)}}
237237 <template id="issue-comment-editor-template">
238- <div class="ui comment form">
238+ <div class="ui form comment ">
239239 {{template "shared/combomarkdowneditor" (dict
240240 "MarkdownPreviewUrl" (print $.Repository.Link "/markup")
241241 "MarkdownPreviewContext" $.RepoLink
249249 {{end}}
250250 <div class="text right edit buttons">
251251 <button class="ui cancel button">{{ctx.Locale.Tr "repo.issues.cancel"}}</button>
252- <button class="ui primary save button">{{ctx.Locale.Tr "repo.issues.save"}}</button>
252+ <button class="ui primary button">{{ctx.Locale.Tr "repo.issues.save"}}</button>
253253 </div>
254254 </div>
255255 </template>
Original file line number Diff line number Diff line change 146146</div>
147147
148148<template id="issue-comment-editor-template">
149- <div class="ui comment form">
149+ <div class="ui form comment ">
150150 <div class="field">
151151 {{template "shared/combomarkdowneditor" (dict
152152 "MarkdownPreviewUrl" (print .Repository.Link "/markup")
164164
165165 <div class="field">
166166 <div class="text right edit">
167- <button class="ui basic cancel button">{{ctx.Locale.Tr "repo.issues.cancel"}}</button>
168- <button class="ui primary save button">{{ctx.Locale.Tr "repo.issues.save"}}</button>
167+ <button class="ui cancel button">{{ctx.Locale.Tr "repo.issues.cancel"}}</button>
168+ <button class="ui primary button">{{ctx.Locale.Tr "repo.issues.save"}}</button>
169169 </div>
170170 </div>
171171 </div>
Original file line number Diff line number Diff line change 11export function handleGlobalEnterQuickSubmit ( target ) {
2- const form = target . closest ( 'form' ) ;
2+ let form = target . closest ( 'form' ) ;
33 if ( form ) {
44 if ( ! form . checkValidity ( ) ) {
55 form . reportValidity ( ) ;
@@ -9,5 +9,10 @@ export function handleGlobalEnterQuickSubmit(target) {
99 // here use the event to trigger the submit event (instead of calling `submit()` method directly)
1010 // otherwise the `areYouSure` handler won't be executed, then there will be an annoying "confirm to leave" dialog
1111 form . dispatchEvent ( new SubmitEvent ( 'submit' , { bubbles : true , cancelable : true } ) ) ;
12+ return ;
13+ }
14+ form = target . closest ( '.ui.form' ) ;
15+ if ( form ) {
16+ form . querySelector ( '.ui.primary.button' ) ?. click ( ) ;
1217 }
1318}
Original file line number Diff line number Diff line change @@ -162,8 +162,8 @@ async function onEditContent(event) {
162162 editContentZone . innerHTML = document . getElementById ( 'issue-comment-editor-template' ) . innerHTML ;
163163 comboMarkdownEditor = await initComboMarkdownEditor ( editContentZone . querySelector ( '.combo-markdown-editor' ) ) ;
164164 comboMarkdownEditor . attachedDropzoneInst = await setupDropzone ( editContentZone . querySelector ( '.dropzone' ) ) ;
165- editContentZone . querySelector ( '.cancel.button' ) . addEventListener ( 'click' , cancelAndReset ) ;
166- editContentZone . querySelector ( '.save .button' ) . addEventListener ( 'click' , saveAndRefresh ) ;
165+ editContentZone . querySelector ( '.ui. cancel.button' ) . addEventListener ( 'click' , cancelAndReset ) ;
166+ editContentZone . querySelector ( '.ui.primary .button' ) . addEventListener ( 'click' , saveAndRefresh ) ;
167167 }
168168
169169 // Show write/preview tab and copy raw content as needed
You can’t perform that action at this time.
0 commit comments