@saasmakers/ui 2.0.80 → 2.0.81
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -46,10 +46,12 @@ const id = useId()
|
|
|
46
46
|
const modelValue = defineModel<FieldInput['modelValue']>({ default: '' })
|
|
47
47
|
const input = ref<HTMLInputElement>()
|
|
48
48
|
const showPassword = ref(false)
|
|
49
|
-
const { isDesktopBrowser } = useDevice()
|
|
50
49
|
|
|
50
|
+
// On mobile, a prior focusWarmupInput() already opened the keyboard in the
|
|
51
|
+
// user gesture; focusing here moves focus input→input so the keyboard stays
|
|
52
|
+
// open and typing lands in the visible field.
|
|
51
53
|
onMounted(() => {
|
|
52
|
-
if (props.autofocus && input.value
|
|
54
|
+
if (props.autofocus && input.value) {
|
|
53
55
|
input.value.focus()
|
|
54
56
|
}
|
|
55
57
|
})
|
|
@@ -30,10 +30,11 @@ const emit = defineEmits<{
|
|
|
30
30
|
const id = useId()
|
|
31
31
|
const modelValue = defineModel<FieldTextarea['modelValue']>({ default: '' })
|
|
32
32
|
const textarea = ref<HTMLTextAreaElement>()
|
|
33
|
-
const { isDesktopBrowser } = useDevice()
|
|
34
33
|
|
|
34
|
+
// Same as FieldInput: on mobile, transfer focus from the keyboard warmup
|
|
35
|
+
// input so typing lands in the visible field while the keyboard stays open.
|
|
35
36
|
onMounted(() => {
|
|
36
|
-
if (props.autofocus && textarea.value
|
|
37
|
+
if (props.autofocus && textarea.value) {
|
|
37
38
|
textarea.value.focus()
|
|
38
39
|
}
|
|
39
40
|
})
|