From 24155d9fff2298e8fd89f2921de558846dffd715 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 2 Jun 2020 17:02:45 +0200 Subject: [PATCH] Ignore double clicks on reaction buttons --- .../files/js/WoltLabSuite/Core/Ui/Reaction/Handler.js | 6 ++++++ 1 file changed, 6 insertions(+) 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; -- 2.20.1