Prevent a page jump when displaying the reaction summary
authorAlexander Ebert <ebert@woltlab.com>
Mon, 22 Jul 2019 14:11:45 +0000 (16:11 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 22 Jul 2019 14:11:45 +0000 (16:11 +0200)
Fixes #2992

wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Reaction/CountButtons.js

index d9e4f4aab72a1a7a65340b7806563c0df76c3117..e0ac81801a1e83e2ff505f4f4168413da68b0fbc 100644 (file)
@@ -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;