We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 876fdda + 195c806 commit 5bb583bCopy full SHA for 5bb583b
src/dd-touch.ts
@@ -10,7 +10,7 @@ import { DDManager } from './dd-manager';
10
* should we use this instead ? (what we had for always showing resize handles)
11
* /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)
12
*/
13
-export const isTouch: boolean = ( 'ontouchstart' in document
+export const isTouch: boolean = typeof window !== 'undefined' && ( 'ontouchstart' in document
14
|| 'ontouchstart' in window
15
// || !!window.TouchEvent // true on Windows 10 Chrome desktop so don't use this
16
|| ((window as any).DocumentTouch && document instanceof (window as any).DocumentTouch)
0 commit comments