From a4e630e57bb80ac5aabd30ecc23fb23647b90a4e Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Wed, 17 Jan 2024 17:10:32 +0100 Subject: [PATCH] Fix react button in additional loaded comments Closes #5762 --- ts/WoltLabSuite/Core/Component/Comment/List.ts | 2 ++ .../files/js/WoltLabSuite/Core/Component/Comment/List.js | 2 ++ 2 files changed, 4 insertions(+) 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; -- 2.20.1