From: Alexander Ebert Date: Thu, 17 Mar 2016 16:25:43 +0000 (+0100) Subject: Fixed detection of proper "click" event X-Git-Tag: 3.0.0_Beta_1~2025 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=73a1a88c2dc464e476ca3859db98947a3479d9c8;p=GitHub%2FWoltLab%2FWCF.git Fixed detection of proper "click" event --- diff --git a/wcfsetup/install/files/js/wcf.globalHelper.js b/wcfsetup/install/files/js/wcf.globalHelper.js index 48dd1d4b12..d3e16555d2 100644 --- a/wcfsetup/install/files/js/wcf.globalHelper.js +++ b/wcfsetup/install/files/js/wcf.globalHelper.js @@ -192,7 +192,7 @@ enforcing 'touchstart' on mobile devices for a better UX. We're using defineProperty() here because at the time of writing Safari does not support 'const'. Thanks Safari. */ - var clickEvent = ('touchstart' in document.documentElement) ? 'touchstart' : 'click'; + var clickEvent = ('touchstart' in document.documentElement || 'ontouchstart' in window || navigator.MaxTouchPoints > 0 || navigator.msMaxTouchPoints > 0) ? 'touchstart' : 'click'; Object.defineProperty(window, 'WCF_CLICK_EVENT', { value: clickEvent });