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 2024-12-28 19:26:16 +08:00 committed by GitHub
parent e69da2cd07
commit 3d3ece36d2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 43 additions and 35 deletions

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');