From: Marcel Werk Date: Wed, 17 Jan 2024 16:10:32 +0000 (+0100) Subject: Fix react button in additional loaded comments X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a4e630e57bb80ac5aabd30ecc23fb23647b90a4e;p=GitHub%2FWoltLab%2FWCF.git Fix react button in additional loaded comments Closes #5762 --- diff --git a/ts/WoltLabSuite/Core/Component/Comment/List.ts b/ts/WoltLabSuite/Core/Component/Comment/List.ts index e8e3b52744..b50bacebaa 100644 --- a/ts/WoltLabSuite/Core/Component/Comment/List.ts +++ b/ts/WoltLabSuite/Core/Component/Comment/List.ts @@ -320,6 +320,7 @@ class CommentList { comment .querySelector(".commentResponseList")! .insertBefore(fragment, comment.querySelector(".commentLoadNextResponses")); + DomChangeListener.trigger(); comment.dataset.lastResponseTime = response.lastResponseTime.toString(); comment.dataset.lastResponseId = response.lastResponseID.toString(); @@ -370,6 +371,7 @@ class CommentList { this.#container .querySelector(".commentList")! .insertBefore(fragment, this.#container.querySelector(".commentLoadNext")); + DomChangeListener.trigger(); this.#container.dataset.lastCommentTime = response.lastCommentTime.toString(); diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Comment/List.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Comment/List.js index 7c4ecb9efb..8d3282e78a 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Comment/List.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Comment/List.js @@ -240,6 +240,7 @@ define(["require", "exports", "tslib", "../../Ajax", "../../Dom/Change/Listener" comment .querySelector(".commentResponseList") .insertBefore(fragment, comment.querySelector(".commentLoadNextResponses")); + Listener_1.default.trigger(); comment.dataset.lastResponseTime = response.lastResponseTime.toString(); comment.dataset.lastResponseId = response.lastResponseID.toString(); this.#initLoadNextResponses(comment); @@ -280,6 +281,7 @@ define(["require", "exports", "tslib", "../../Ajax", "../../Dom/Change/Listener" this.#container .querySelector(".commentList") .insertBefore(fragment, this.#container.querySelector(".commentLoadNext")); + Listener_1.default.trigger(); this.#container.dataset.lastCommentTime = response.lastCommentTime.toString(); if (this.#displayedComments < this.#totalComments) { button.disabled = false;