fix(ui): reset content of text field for comments when cancelling (#6595)
Currently, the content of the text field is not reset when you cancel editing. This change resets the content of the text field when editing is canceled. If this is not done and you click on cancel and then on edit again, you can no longer return to the initial content without completely reloading the page. Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6595 Reviewed-by: Otto <otto@codeberg.org> Reviewed-by: Gusted <gusted@noreply.codeberg.org> Co-authored-by: Beowulf <beowulf@beocode.eu> Co-committed-by: Beowulf <beowulf@beocode.eu>
This commit is contained in:
parent
376a2e19ea
commit
34e1100ae2
2 changed files with 22 additions and 0 deletions
|
@ -405,6 +405,7 @@ async function onEditContent(event) {
|
|||
e.preventDefault();
|
||||
showElem(renderContent);
|
||||
hideElem(editContentZone);
|
||||
comboMarkdownEditor.value(rawContent.textContent);
|
||||
comboMarkdownEditor.attachedDropzoneInst?.emit('reload');
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue