diff --git a/src/VueDatePicker/composables/useArrowNavigation.ts b/src/VueDatePicker/composables/useArrowNavigation.ts index 82140a73..093ba637 100644 --- a/src/VueDatePicker/composables/useArrowNavigation.ts +++ b/src/VueDatePicker/composables/useArrowNavigation.ts @@ -3,14 +3,19 @@ import { computed, nextTick, onMounted, onUnmounted, ref, watch } from 'vue'; import { EventKey } from '@/constants'; export const useArrowNavigation = () => { - const { rootProps, state } = useContext(); + const { rootProps, state, defaults: { textInput } } = useContext(); const level = computed(() => state.arrowNavigationLevel); const rowIndex = ref(-1); const colIndex = ref(-1); watch(level, (newVal, oldVal) => { - focusInitial(newVal === 0 && oldVal > 0); + let ignoreActive = newVal === 0 && oldVal > 0; + if (textInput.value.enabled && textInput.value.selectOnFocus) { + ignoreActive = true; + } + + focusInitial(ignoreActive); }); const gridMatrix = ref([]);