From: Tim Düsterhus Date: Thu, 1 Sep 2016 15:55:24 +0000 (+0200) Subject: Use transitionend event instead of timer in Android touch menu X-Git-Tag: 3.0.0_Beta_1~359 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6d6477b04ea598ad4e17e885ad2b154b0515fec6;p=GitHub%2FWoltLab%2FWCF.git Use transitionend event instead of timer in Android touch menu --- diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Page/Menu/Abstract.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Page/Menu/Abstract.js index 4aef7491c2..4b47db7c02 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Page/Menu/Abstract.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Page/Menu/Abstract.js @@ -250,9 +250,9 @@ define(['Core', 'Environment', 'EventHandler', 'ObjectMap', 'Dom/Traverse', 'Dom this._menu.classList.add('androidMenuTouchEnd'); this._menu.style.removeProperty('transform'); backdrop.style.removeProperty(appearsAt); - setTimeout((function() { + this._menu.addEventListener('transitionend', (function() { this._menu.classList.remove('androidMenuTouchEnd'); - }).bind(this), 300); + }).bind(this), { once: true }); // check whether the user moved the finger far enough if (appearsAt === 'left') {