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
});