From 29c59c96bd502044a8d9659cfc1c01df08b111cc Mon Sep 17 00:00:00 2001 From: JakobDev Date: Mon, 30 Dec 2024 17:33:52 +0100 Subject: [PATCH] Fix edit cancel button --- templates/repo/issue/view_content.tmpl | 4 ++-- web_src/js/features/repo-legacy.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/templates/repo/issue/view_content.tmpl b/templates/repo/issue/view_content.tmpl index f074a854b5..8eac2d78cf 100644 --- a/templates/repo/issue/view_content.tmpl +++ b/templates/repo/issue/view_content.tmpl @@ -163,8 +163,8 @@
- - + +
diff --git a/web_src/js/features/repo-legacy.js b/web_src/js/features/repo-legacy.js index b095165491..a4606aa3b5 100644 --- a/web_src/js/features/repo-legacy.js +++ b/web_src/js/features/repo-legacy.js @@ -464,8 +464,8 @@ async function onEditContent(event) { comboMarkdownEditor = await initComboMarkdownEditor(editContentZone.querySelector('.combo-markdown-editor')); comboMarkdownEditor.attachedDropzoneInst = await setupDropzone(editContentZone.querySelector('.dropzone')); editContentZone.addEventListener('ce-quick-submit', saveAndRefresh); - editContentZone.querySelector('.cancel.button').addEventListener('click', cancelAndReset); - editContentZone.querySelector('.save.button').addEventListener('click', saveAndRefresh); + editContentZone.querySelector('button[data-button-name="cancel-edit"]').addEventListener('click', cancelAndReset); + editContentZone.querySelector('button[data-button-name="save-edit"]').addEventListener('click', saveAndRefresh); } else { const tabEditor = editContentZone.querySelector('.combo-markdown-editor').querySelector('.tabular.menu > a[data-tab-for=markdown-writer]'); tabEditor?.click();