mirror of
https://github.com/danbulant/Portfolio
synced 2026-05-24 12:35:31 +00:00
fix: use on key up
This commit is contained in:
parent
09d260136e
commit
5c089f4dd1
1 changed files with 2 additions and 2 deletions
|
|
@ -8,7 +8,7 @@
|
|||
let codeValueArray: Array<string> = [];
|
||||
let codeElementArray: Array<HTMLInputElement> = [];
|
||||
|
||||
const inputMobileOnKeyDown = (event: KeyboardEvent) => {
|
||||
const inputMobileOnKeyUp = (event: KeyboardEvent) => {
|
||||
let input = event.target as HTMLInputElement;
|
||||
if (input.value.length > 8) {
|
||||
input.value = input.value.slice(0, 8);
|
||||
|
|
@ -50,7 +50,7 @@
|
|||
bind:value={codeValueMobile}
|
||||
type="text"
|
||||
class="codeInputMobile"
|
||||
on:keydown={inputMobileOnKeyDown}
|
||||
on:keyup={inputMobileOnKeyUp}
|
||||
/>
|
||||
{#each [1, 2, 3, 4] as value}
|
||||
<input
|
||||
|
|
|
|||
Loading…
Reference in a new issue