From 839f06a3a8e72991890f51cc581d15e6a0633128 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Mon, 22 Jul 2019 16:11:45 +0200 Subject: [PATCH] Prevent a page jump when displaying the reaction summary Fixes #2992 --- .../js/WoltLabSuite/Core/Ui/Reaction/CountButtons.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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; -- 2.20.1