From: Alexander Ebert Date: Mon, 6 Mar 2017 11:01:47 +0000 (+0100) Subject: Remove permalink response if it was loaded X-Git-Tag: 3.1.0_Alpha_1~603 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=28db760169a30f72e94611877cbafd9c842d5d07;p=GitHub%2FWoltLab%2FWCF.git Remove permalink response if it was loaded See #2231 --- diff --git a/wcfsetup/install/files/js/WCF.Comment.js b/wcfsetup/install/files/js/WCF.Comment.js index da8751670c..92654a58ff 100644 --- a/wcfsetup/install/files/js/WCF.Comment.js +++ b/wcfsetup/install/files/js/WCF.Comment.js @@ -860,6 +860,16 @@ WCF.Comment.Handler = Class.extend({ // update button state to load next responses this._handleLoadNextResponses(data.returnValues.commentID); + + // check if permalink response has been loaded and remove it from view + if (this._permalinkResponse) { + var responseId = elData(this._permalinkResponse, 'object-id'); + + if (elBySel('.commentResponse[data-object-id="' + responseId + '"]:not(.commentPermalinkContainer)', this._container[0]) !== null) { + elRemove(this._permalinkResponse); + this._permalinkResponse = null; + } + } }, /**