Skip to content

Commit 48e8e14

Browse files
committed
flow: Event handlers, except .target
1 parent 8aefc08 commit 48e8e14

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/webview/js/js.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ document.addEventListener('message', e => {
315315
scrollEventsDisabled = false;
316316
});
317317

318-
documentBody.addEventListener('click', e => {
318+
documentBody.addEventListener('click', (e: any) => {
319319
e.preventDefault();
320320
lastTouchEventTimestamp = 0;
321321

@@ -410,7 +410,7 @@ const handleLongPress = (e: TouchEvent) => {
410410
});
411411
};
412412

413-
documentBody.addEventListener('touchstart', e => {
413+
documentBody.addEventListener('touchstart', (e: TouchEvent) => {
414414
if (e.changedTouches[0].pageX < 20) {
415415
return;
416416
}
@@ -421,7 +421,7 @@ documentBody.addEventListener('touchstart', e => {
421421
setTimeout(() => handleLongPress(e), 500);
422422
});
423423

424-
documentBody.addEventListener('touchend', e => {
424+
documentBody.addEventListener('touchend', (e: TouchEvent) => {
425425
if (
426426
isNearPositions(
427427
lastTouchPositionX,
@@ -434,11 +434,11 @@ documentBody.addEventListener('touchend', e => {
434434
}
435435
});
436436

437-
documentBody.addEventListener('touchmove', e => {
437+
documentBody.addEventListener('touchmove', (e: TouchEvent) => {
438438
lastTouchEventTimestamp = 0;
439439
});
440440

441-
documentBody.addEventListener('drag', e => {
441+
documentBody.addEventListener('drag', (e: DragEvent) => {
442442
lastTouchEventTimestamp = 0;
443443
});
444444

0 commit comments

Comments
 (0)