Proper detection of touch-capability on Windows 8/IE 10/11
authorAlexander Ebert <ebert@woltlab.com>
Sun, 3 Nov 2013 13:03:25 +0000 (14:03 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Sun, 3 Nov 2013 13:03:25 +0000 (14:03 +0100)
wcfsetup/install/files/js/WCF.js

index 8f01cdcef84fdd9483407029b7d5583f9f5edcba..89b98856f7070832b16114814452f8803ca0f394 100755 (executable)
@@ -133,7 +133,7 @@ String.prototype.hashCode = function() {
        }
        
        jQuery.browser = browser;
-       jQuery.browser.touch = (!!('ontouchstart' in window) || !!('msMaxTouchPoints' in window.navigator));
+       jQuery.browser.touch = (!!('ontouchstart' in window) || (!!('msMaxTouchPoints' in window.navigator) && window.navigator.msMaxTouchPoints > 0));
        
        // detect smartphones
        jQuery.browser.smartphone = ($('html').css('caption-side') == 'bottom');