File tree 4 files changed +13
-8
lines changed
4 files changed +13
-8
lines changed Original file line number Diff line number Diff line change 235
235
236
236
{{if and (not $.Repository.IsArchived) (not .DiffNotAvailable)}}
237
237
<template id="issue-comment-editor-template">
238
- <div class="ui comment form">
238
+ <div class="ui form comment ">
239
239
{{template "shared/combomarkdowneditor" (dict
240
240
"MarkdownPreviewUrl" (print $.Repository.Link "/markup")
241
241
"MarkdownPreviewContext" $.RepoLink
249
249
{{end}}
250
250
<div class="text right edit buttons">
251
251
<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>
253
253
</div>
254
254
</div>
255
255
</template>
Original file line number Diff line number Diff line change 146
146
</div>
147
147
148
148
<template id="issue-comment-editor-template">
149
- <div class="ui comment form">
149
+ <div class="ui form comment ">
150
150
<div class="field">
151
151
{{template "shared/combomarkdowneditor" (dict
152
152
"MarkdownPreviewUrl" (print .Repository.Link "/markup")
164
164
165
165
<div class="field">
166
166
<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>
169
169
</div>
170
170
</div>
171
171
</div>
Original file line number Diff line number Diff line change 1
1
export function handleGlobalEnterQuickSubmit ( target ) {
2
- const form = target . closest ( 'form' ) ;
2
+ let form = target . closest ( 'form' ) ;
3
3
if ( form ) {
4
4
if ( ! form . checkValidity ( ) ) {
5
5
form . reportValidity ( ) ;
@@ -9,5 +9,10 @@ export function handleGlobalEnterQuickSubmit(target) {
9
9
// here use the event to trigger the submit event (instead of calling `submit()` method directly)
10
10
// otherwise the `areYouSure` handler won't be executed, then there will be an annoying "confirm to leave" dialog
11
11
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 ( ) ;
12
17
}
13
18
}
Original file line number Diff line number Diff line change @@ -162,8 +162,8 @@ async function onEditContent(event) {
162
162
editContentZone . innerHTML = document . getElementById ( 'issue-comment-editor-template' ) . innerHTML ;
163
163
comboMarkdownEditor = await initComboMarkdownEditor ( editContentZone . querySelector ( '.combo-markdown-editor' ) ) ;
164
164
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 ) ;
167
167
}
168
168
169
169
// Show write/preview tab and copy raw content as needed
You can’t perform that action at this time.
0 commit comments