summaryrefslogtreecommitdiffstats
path: root/src/com/vaadin/terminal/gwt/client/BrowserInfo.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/vaadin/terminal/gwt/client/BrowserInfo.java')
-rw-r--r--src/com/vaadin/terminal/gwt/client/BrowserInfo.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/BrowserInfo.java b/src/com/vaadin/terminal/gwt/client/BrowserInfo.java
index e5006f4a9c..330e4cf5de 100644
--- a/src/com/vaadin/terminal/gwt/client/BrowserInfo.java
+++ b/src/com/vaadin/terminal/gwt/client/BrowserInfo.java
@@ -64,13 +64,23 @@ public class BrowserInfo {
browserDetails.setIEMode(documentMode);
}
}
- touchDevice = detectTouchDevice();
+
+ if (browserDetails.isChrome()) {
+ touchDevice = detectChromeTouchDevice();
+ } else {
+ touchDevice = detectTouchDevice();
+ }
}
private native boolean detectTouchDevice()
/*-{
try { document.createEvent("TouchEvent");return true;} catch(e){return false;};
}-*/;
+
+ private native boolean detectChromeTouchDevice()
+ /*-{
+ return ("ontouchstart" in window);
+ }-*/;
private native int getIEDocumentMode()
/*-{