Allow touchmode for Microsoft Surface tablets
'ontouchstart' wasn't enough to detect touch on MS Surface devices
This commit is contained in:
parent
f52105bc88
commit
b14c73afd1
|
|
@ -53,7 +53,10 @@ var UI;
|
||||||
|
|
||||||
// Render default UI and initialize settings menu
|
// Render default UI and initialize settings menu
|
||||||
start: function(callback) {
|
start: function(callback) {
|
||||||
UI.isTouchDevice = 'ontouchstart' in document.documentElement;
|
UI.isTouchDevice = (('ontouchstart' in window)
|
||||||
|
// required for MS Surface
|
||||||
|
|| (navigator.maxTouchPoints > 0)
|
||||||
|
|| (navigator.msMaxTouchPoints > 0));
|
||||||
|
|
||||||
// Stylesheet selection dropdown
|
// Stylesheet selection dropdown
|
||||||
var sheet = WebUtil.selectStylesheet();
|
var sheet = WebUtil.selectStylesheet();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue