Roo.js
authorAlan Knowles <alan@roojs.com>
Fri, 30 Sep 2016 02:57:06 +0000 (10:57 +0800)
committerAlan Knowles <alan@roojs.com>
Fri, 30 Sep 2016 02:57:06 +0000 (10:57 +0800)
Roo.js

diff --git a/Roo.js b/Roo.js
index d9ededc..c7ac781 100644 (file)
--- a/Roo.js
+++ b/Roo.js
@@ -67,6 +67,10 @@ Roo.apply = function(o, c, defaults){
         isTouch =  (function() {
             try {
                 if (ua.indexOf('chrome') != -1 && ua.indexOf('android') == -1) {
+                    window.addEventListener('touchstart', function __set_has_touch__ () {
+                        Roo.isTouch = true;
+                        winow.removeEventListener('touchstart', __set_has_touch__);
+                    });
                     return false; // no touch on chrome!?
                 }
                 document.createEvent("TouchEvent");