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.
1 parent 5bb583b commit ed00a07Copy full SHA for ed00a07
src/dd-touch.ts
@@ -10,7 +10,8 @@ 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 = typeof window !== 'undefined' && ( 'ontouchstart' in document
+export const isTouch: boolean = typeof window !== 'undefined' && typeof document !== 'undefined' &&
14
+( 'ontouchstart' in document
15
|| 'ontouchstart' in window
16
// || !!window.TouchEvent // true on Windows 10 Chrome desktop so don't use this
17
|| ((window as any).DocumentTouch && document instanceof (window as any).DocumentTouch)
0 commit comments