Skip to content

Commit 9d4f26e

Browse files
committed
fine tune edge cases
1 parent 84c914f commit 9d4f26e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

web_src/js/features/repo-issue-edit.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,10 @@ async function tryOnEditContent(e) {
100100
comboMarkdownEditor.container.addEventListener(ComboMarkdownEditor.EventUploadStateChanged, syncUiState);
101101
cancelButton.addEventListener('click', cancelAndReset);
102102
form.addEventListener('submit', saveAndRefresh);
103+
} else {
104+
form = editContentZone.querySelector('form');
105+
form.classList.remove('ignore-dirty'); // the form is shown again, respect the "dirty" state
103106
}
104-
form.classList.remove('ignore-dirty');
105107

106108
// FIXME: ideally here should reload content and attachment list from backend for existing editor, to avoid losing data
107109
if (!comboMarkdownEditor.value()) {

0 commit comments

Comments
 (0)