From: Alexander Ebert Date: Tue, 2 Jun 2020 15:02:45 +0000 (+0200) Subject: Ignore double clicks on reaction buttons X-Git-Tag: 5.2.7~25 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=24155d9fff2298e8fd89f2921de558846dffd715;p=GitHub%2FWoltLab%2FWCF.git Ignore double clicks on reaction buttons --- diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Reaction/Handler.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Reaction/Handler.js index 89e614d1ee..7e0a60363c 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Reaction/Handler.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Reaction/Handler.js @@ -353,6 +353,12 @@ define( * @param {init} reactionTypeId */ _react: function(reactionTypeId) { + if (~~this._popoverCurrentObjectId === 0) { + // Double clicking the reaction will cause the first click to go through, but + // causes the second to fail because the overlay is already closing. + return; + } + this._options.parameters.reactionTypeID = reactionTypeId; this._options.parameters.data.objectID = this._popoverCurrentObjectId; this._options.parameters.data.objectType = this._objectType;