mirror of
https://github.com/danbulant/Portfolio
synced 2026-06-09 01:30:18 +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 codeValueArray: Array<string> = [];
|
||||||
let codeElementArray: Array<HTMLInputElement> = [];
|
let codeElementArray: Array<HTMLInputElement> = [];
|
||||||
|
|
||||||
const inputMobileOnKeyDown = (event: KeyboardEvent) => {
|
const inputMobileOnKeyUp = (event: KeyboardEvent) => {
|
||||||
let input = event.target as HTMLInputElement;
|
let input = event.target as HTMLInputElement;
|
||||||
if (input.value.length > 8) {
|
if (input.value.length > 8) {
|
||||||
input.value = input.value.slice(0, 8);
|
input.value = input.value.slice(0, 8);
|
||||||
|
|
@ -50,7 +50,7 @@
|
||||||
bind:value={codeValueMobile}
|
bind:value={codeValueMobile}
|
||||||
type="text"
|
type="text"
|
||||||
class="codeInputMobile"
|
class="codeInputMobile"
|
||||||
on:keydown={inputMobileOnKeyDown}
|
on:keyup={inputMobileOnKeyUp}
|
||||||
/>
|
/>
|
||||||
{#each [1, 2, 3, 4] as value}
|
{#each [1, 2, 3, 4] as value}
|
||||||
<input
|
<input
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue