From 0927a70a644170af25b5fac22ea70626b18eb85c Mon Sep 17 00:00:00 2001 From: Andrea Bogazzi Date: Fri, 23 Nov 2018 09:10:30 +0100 Subject: [PATCH] wider detection of touch events (#5406) * wider detection * node... --- HEADER.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/HEADER.js b/HEADER.js index a1ee13cf..1c481068 100644 --- a/HEADER.js +++ b/HEADER.js @@ -32,7 +32,8 @@ else { * True when in environment that supports touch events * @type boolean */ -fabric.isTouchSupported = 'ontouchstart' in fabric.window; +fabric.isTouchSupported = 'ontouchstart' in fabric.window || 'ontouchstart' in fabric.document || + (fabric.window && fabric.window.navigator && fabric.window.navigator.maxTouchPoints > 0); /** * True when in environment that's probably Node.js