From 62bbc4de0d64c7ee75febcc8ec584434082cb96f Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Wed, 8 Jul 2015 14:58:43 +0800 Subject: [PATCH] Roo.js --- Roo.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Roo.js b/Roo.js index 070c992484..a7c7a8bbdc 100644 --- a/Roo.js +++ b/Roo.js @@ -61,7 +61,15 @@ Roo.apply = function(o, c, defaults){ isMac = (ua.indexOf("macintosh") != -1 || ua.indexOf("mac os x") != -1), isLinux = (ua.indexOf("linux") != -1), isSecure = window.location.href.toLowerCase().indexOf("https") === 0, - isTouch = 'ontouchstart' in window || window.DocumentTouch && document instanceof DocumentTouch; + isTouch = (function() { + try { + document.createEvent("TouchEvent"); + return true; + } catch (e) { + return false; + } + + })(); // remove css image flicker if(isIE && !isIE7){ try{ -- 2.39.2