Skip to content
This repository was archived by the owner on Apr 17, 2022. It is now read-only.

Commit 4c6cc0b

Browse files
committed
fix: remove preventDefault event on menu pointer down
1 parent 604fbee commit 4c6cc0b

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/Vue3DatePicker/components/DatepickerMenu.vue

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -316,11 +316,12 @@
316316
menu.focus({ preventScroll: true });
317317
}
318318
if (menu) {
319-
menu.addEventListener('pointerdown', (e) => {
320-
e.preventDefault();
321-
e.stopPropagation();
322-
e.stopImmediatePropagation();
323-
});
319+
const stopDefault = (event: Event) => {
320+
event.stopImmediatePropagation();
321+
event.stopPropagation();
322+
};
323+
menu.addEventListener('pointerdown', stopDefault);
324+
menu.addEventListener('mousedown', stopDefault);
324325
}
325326
document.addEventListener('resize', getCalendarWidth);
326327
});

0 commit comments

Comments
 (0)