From: Alexander Ebert Date: Mon, 22 Jul 2019 14:11:45 +0000 (+0200) Subject: Prevent a page jump when displaying the reaction summary X-Git-Tag: 5.2.0_Alpha_3~19 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=839f06a3a8e72991890f51cc581d15e6a0633128;p=GitHub%2FWoltLab%2FWCF.git Prevent a page jump when displaying the reaction summary Fixes #2992 --- diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Reaction/CountButtons.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Reaction/CountButtons.js index d9e4f4aab7..e0ac81801a 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Reaction/CountButtons.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Reaction/CountButtons.js @@ -170,17 +170,18 @@ define( /** * Shows the reaction overly for a specific object. * - * @param {int} objectId + * @param {int} objectId + * @param {Event} event */ - _showReactionOverlay: function(objectId) { + _showReactionOverlay: function(objectId, event) { + event.preventDefault(); + this._currentObjectId = objectId; this._showOverlay(); }, /** - * Shows a specific page of the current opened reaction overlay. - * - * @param {int} pageNo + * Shows a specific page of the current opened reaction overlay. */ _showOverlay: function() { this._options.parameters.data.containerID = this._objectType + '-' + this._currentObjectId;