Skip to content

Commit cd6f965

Browse files
committed
fix(polyfill): window ontouchstart & ontouchstart
1 parent 5afb29f commit cd6f965

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

packages/canvas-polyfill/window.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,8 @@ if ((global as any).document) {
166166
(global as any).document.readyState = 'complete';
167167
}
168168

169-
if (!global.ontouchstart) {
170-
global.ontouchstart = () => {};
171-
}
169+
(global as any).window.ontouchstart = global.ontouchstart = () => {};
170+
(global as any).window.onpointerdown = global.onpointerdown = () => {};
172171

173172
(global as any).window.setTimeout = setTimeout;
174173
(global as any).window.setInterval = setInterval;

0 commit comments

Comments
 (0)