Skip to content

Commit

Permalink
fix(VNumberInput): keep dot when using backspace
Browse files Browse the repository at this point in the history
  • Loading branch information
jsek committed Jun 1, 2024
1 parent cc8cd3e commit d72bd10
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/vuetify/src/labs/VNumberInput/VNumberInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ export const VNumberInput = genericComponent<VNumberInputSlots>()({
}

function onKeydown (e: KeyboardEvent) {
isTyping.value = true

if (
['Enter', 'ArrowLeft', 'ArrowRight', 'Backspace', 'Tab'].includes(e.key) ||
e.ctrlKey
Expand All @@ -145,7 +147,6 @@ export const VNumberInput = genericComponent<VNumberInputSlots>()({
if (!/^[0-9\-+.]+$/.test(e.key)) {
e.preventDefault()
}
isTyping.value = true
}

function syncTextModel () {
Expand Down

0 comments on commit d72bd10

Please sign in to comment.