mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-01-07 21:04:38 +01:00
Fix edit cancel button
This commit is contained in:
parent
5e7981aa07
commit
29c59c96bd
2 changed files with 4 additions and 4 deletions
|
@ -163,8 +163,8 @@
|
||||||
|
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="text right edit">
|
<div class="text right edit">
|
||||||
<button class="ui basic cancel button">{{ctx.Locale.Tr "repo.issues.cancel"}}</button>
|
<button class="ui basic cancel button" data-button-name="cancel-edit">{{ctx.Locale.Tr "repo.issues.cancel"}}</button>
|
||||||
<button class="ui primary save button">{{ctx.Locale.Tr "repo.issues.save"}}</button>
|
<button class="ui primary save button" data-button-name="save-edit">{{ctx.Locale.Tr "repo.issues.save"}}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -464,8 +464,8 @@ async function onEditContent(event) {
|
||||||
comboMarkdownEditor = await initComboMarkdownEditor(editContentZone.querySelector('.combo-markdown-editor'));
|
comboMarkdownEditor = await initComboMarkdownEditor(editContentZone.querySelector('.combo-markdown-editor'));
|
||||||
comboMarkdownEditor.attachedDropzoneInst = await setupDropzone(editContentZone.querySelector('.dropzone'));
|
comboMarkdownEditor.attachedDropzoneInst = await setupDropzone(editContentZone.querySelector('.dropzone'));
|
||||||
editContentZone.addEventListener('ce-quick-submit', saveAndRefresh);
|
editContentZone.addEventListener('ce-quick-submit', saveAndRefresh);
|
||||||
editContentZone.querySelector('.cancel.button').addEventListener('click', cancelAndReset);
|
editContentZone.querySelector('button[data-button-name="cancel-edit"]').addEventListener('click', cancelAndReset);
|
||||||
editContentZone.querySelector('.save.button').addEventListener('click', saveAndRefresh);
|
editContentZone.querySelector('button[data-button-name="save-edit"]').addEventListener('click', saveAndRefresh);
|
||||||
} else {
|
} else {
|
||||||
const tabEditor = editContentZone.querySelector('.combo-markdown-editor').querySelector('.tabular.menu > a[data-tab-for=markdown-writer]');
|
const tabEditor = editContentZone.querySelector('.combo-markdown-editor').querySelector('.tabular.menu > a[data-tab-for=markdown-writer]');
|
||||||
tabEditor?.click();
|
tabEditor?.click();
|
||||||
|
|
Loading…
Reference in a new issue