From 3310101620c0dd430cfba8a7a808159f1261ac9d Mon Sep 17 00:00:00 2001 From: Jorgen Rydenius Date: Thu, 8 Aug 2013 14:57:10 +0200 Subject: [PATCH] Added detection of a browser's touch capability according to http://stackoverflow.com/questions/3974827/detecting-touch-screen-devices-with-javascript/3996900#comment-21579245 --- src/prototype/prototype.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/prototype/prototype.js b/src/prototype/prototype.js index ef5b04604..10e6f5afc 100644 --- a/src/prototype/prototype.js +++ b/src/prototype/prototype.js @@ -136,7 +136,13 @@ var Prototype = { div = form = null; return isSupported; - })() + })(), + /** + * Prototype.BrowserFeatures.Touch -> Boolean + * + * Detects if the browser supports touch interaction. + **/ + Touch: navigator.msMaxTouchPoints || ('ontouchstart' in document.documentElement) }, ScriptFragment: ']*>([\\S\\s]*?)<\/script\\s*>',