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

Commit af9582c

Browse files
committed
fix: Prevent scroll on menu focus
1 parent 982f82a commit af9582c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Vue3DatePicker/components/DatepickerMenu.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,9 @@
196196
}
197197
const menu = unrefElement(dpMenuRef);
198198
if (menu && !props.textInput && !props.inline) {
199-
menu.focus();
199+
menu.focus({ preventScroll: true });
200+
}
201+
if (menu) {
200202
menu.addEventListener('pointerdown', (e) => {
201203
e.stopImmediatePropagation();
202204
});

0 commit comments

Comments
 (0)