From 6d6477b04ea598ad4e17e885ad2b154b0515fec6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Thu, 1 Sep 2016 17:55:24 +0200 Subject: [PATCH] Use transitionend event instead of timer in Android touch menu --- .../files/js/WoltLabSuite/Core/Ui/Page/Menu/Abstract.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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') { -- 2.20.1