diff --git a/src/components/common/PinCodeInput.vue b/src/components/common/PinCodeInput.vue index 35fb9320..3c92d81e 100644 --- a/src/components/common/PinCodeInput.vue +++ b/src/components/common/PinCodeInput.vue @@ -7,6 +7,7 @@ :ref="`pin-code-input-${index}`" :value="codes[index].value" :type="codes[index].inputType" + :autofocus="autofocus && index === 0 ? 'autofocus' : undefined" @focus="codes[index].focused = true" @blur="codes[index].focused = false" @keydown="onKeydown(index, $event)" @@ -21,6 +22,7 @@ export default { props: [ 'modelValue', + 'autofocus', 'secure', 'length' ], diff --git a/src/views/desktop/UnlockPage.vue b/src/views/desktop/UnlockPage.vue index 1f8027c4..160fe9c6 100644 --- a/src/views/desktop/UnlockPage.vue +++ b/src/views/desktop/UnlockPage.vue @@ -19,7 +19,8 @@ - +