Refactor comment history and fix content edit (#33018)

And fix a regression bug for comment content editing.

Now 11 "import jquery" files left
This commit is contained in:
wxiaoguang authored and GitHub committed 2024-12-28 19:26:16 +08:00
1 parent e69da2cd07
commit 3d3ece36d2
4 files changed
+43 -35

No files matched your search

+2
View File
@@ -38,6 +38,8 @@ function initRepoDiffFileViewToggle() {
}
function initRepoDiffConversationForm() {
// FIXME: there could be various different form in a conversation-holder (for example: reply form, edit form).
// This listener is for "reply form" only, it should clearly distinguish different forms in the future.
addDelegatedEventListener<HTMLFormElement, SubmitEvent>(document, 'submit', '.conversation-holder form', async (form, e) => {
e.preventDefault();
const textArea = form.querySelector<HTMLTextAreaElement>('textarea');