Repository navigation
NumberField backspace gets stuck mid-unit when using style: 'unit' format options #2849
Replies: 1 comment
|
This is a confirmed bug, and it's already fixed — just not released yet. Root cause matches exactly what you described: on a collapsed backspace deletion, the Fixed in #2851 (merged 2026-08-07, linked to #2850): the Status: merged to One more thing worth knowing from the PR discussion: react-aria (which this handler was ported from) validates the real post-delete value instead of skipping validation, so it stops one keystroke earlier (at |
Uh oh!
There was an error while loading. Please reload this page.
Using NumberField (reka-ui 2.10.1) with:
:format-options="{
style: 'unit',
unit: 'minute',
unitDisplay: 'short',
}"
When the input shows "13 min" and you press Backspace repeatedly, it stops at "13 mi" — deleting the i would produce "13 m", which NumberParser.isValidPartialNumber rejects, so @beforeinput in NumberFieldInput.vue calls preventDefault() and the keystroke is silently swallowed. There's no way to backspace through the unit suffix one character at a time.
Selecting all and deleting does work (the resulting empty string passes validation), so this seems specific to incremental backspacing through the unit literal.
Is there a recommended workaround, or is this considered a bug in the partial-validation logic for unit-formatted values?
All reactions