๐ - Entering an initial decimal in a numeric input field with selected text throws away decimal on alternate attempts
RickWassum opened this issue ยท 0 comments
RickWassum commented
Which package(s) are the source of the bug?
@maskito/kit
Playground Link
https://maskito.dev/kit/number
Description
- Click into the High Precision input
- Type 1
- Select the 1
- Type a period '.' and you will see '0.'
- Select the '0.'
- Type a period '.' and you will see the input is cleared and the placeholder displayed
Expect it should again display '0.'
It appears there is some type of internal state that is perhaps not being set/reset properly, so if the input is selected and the first character you type is a period, then one time it will result in "0." and the next time it will be blank, throwing away the period, and it will continue to alternate this behavior. This can be an issue when tabbing into a field and attempting to enter a number starting with a decimal because the initial decimal entered may be thrown away so instead of enter .123 you end up with 123. This can be a problem, particularly if the user is entering data quickly and does not notice the error.
Maskito version
2.3.1
Which browsers have you used?
- Chrome
- Firefox
- Safari
- Edge
Which operating systems have you used?
- macOS
- Windows
- Linux
- iOS
- Android