In my vue project I have created component for 2FA fields, it consists 6 inputs, and they look like this:
<input
class="input-two-fa"
:id="`n5`" type="number"
v-model="i5"
:disabled="disabled"
min="0"
max="9"
autocomplete="off"
autofocus
oninput="this.nextElementSibling.focus()"
>
As you can see, there such line of code:
oninput="this.nextElementSibling.focus()"
It focuses next input, when user provides value. What I need, is to implement such functionality that would focus on previous inout if user removes value (missclick, for example).
Is there any built-in (like oninput="this.nextElementSibling.focus()") functionality or I have to create my own?
Basically, in pseudocode, I need not oninput, but onoutpunt. Event listener, for deleting characters from input.