Check fabric.window for ontouchstart (#4302)

Fixes #2664
This commit is contained in:
Jordan Acosta 2017-09-16 04:06:47 -07:00 committed by Andrea Bogazzi
parent 87f4fc905b
commit cdd28b01a2

View file

@ -26,7 +26,7 @@ else {
* True when in environment that supports touch events
* @type boolean
*/
fabric.isTouchSupported = 'ontouchstart' in fabric.document.documentElement;
fabric.isTouchSupported = 'ontouchstart' in fabric.window;
/**
* True when in environment that's probably Node.js