From d72bd10220a571ca2ced215666872f6ae67b4d9e Mon Sep 17 00:00:00 2001 From: jsek Date: Sat, 1 Jun 2024 06:04:13 +0200 Subject: [PATCH] fix(VNumberInput): keep dot when using backspace --- packages/vuetify/src/labs/VNumberInput/VNumberInput.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/vuetify/src/labs/VNumberInput/VNumberInput.tsx b/packages/vuetify/src/labs/VNumberInput/VNumberInput.tsx index 743b1ef5ac6e..2d7a4a41ae3d 100644 --- a/packages/vuetify/src/labs/VNumberInput/VNumberInput.tsx +++ b/packages/vuetify/src/labs/VNumberInput/VNumberInput.tsx @@ -123,6 +123,8 @@ export const VNumberInput = genericComponent()({ } function onKeydown (e: KeyboardEvent) { + isTyping.value = true + if ( ['Enter', 'ArrowLeft', 'ArrowRight', 'Backspace', 'Tab'].includes(e.key) || e.ctrlKey @@ -145,7 +147,6 @@ export const VNumberInput = genericComponent()({ if (!/^[0-9\-+.]+$/.test(e.key)) { e.preventDefault() } - isTyping.value = true } function syncTextModel () {