Closed twantonie closed 5 years ago
Hi @twantonie!
TLDR; Use a "text" type input, and it'll work as expected (demo).
The problem is that the "number" type of input doesn't work with this library.
The first issue is that the caret position can only be read for inputs of type text, search, URL, tel and password (ref). This breaks the ability to click in the middle of a value and enter a value using the virtual keyboard.
The second issue is probably an internal one, but I don't plan on fixing it since the "number" type input doesn't work as expected anyway. When you type in 8.
the input clears, and you'll see this message in the console log:
The specified value "8." is not a valid number. The value must match to the following regular expression: -?(\d+|\d+.\d+|.\d+)([eE][-+]?\d+)?
Thank you for your quick response
Hi,
When using a number input with usePreview: false, pressing the decimal key clears the input. This issue can be observed in the following fiddle.