Mottie / Keyboard

Virtual Keyboard using jQuery ~
http://mottie.github.io/Keyboard/
Other
1.78k stars 723 forks source link

Backspace Issue with input of type number #630

Closed obermillerk closed 6 years ago

obermillerk commented 6 years ago

Using backspace in a number input will only delete from the right end, even if the caret is located elsewhere in the string.

For example, say the number 123 is the current value. Place the caret directly to the right of the 1 and press backspace, you would expect this to delete the 1, leaving a value of 23. Instead, the caret is moved to the right side and the 3 is deleted, leaving a value of 12.

I have only found this behavior in number inputs, of the input types that work with the keyboard. I should also note that date, datetime-local, month, time, and week types crash the keyboard and prevent it from working due to those types not supporting selection, despite supporting keyboard input.

Mottie commented 6 years ago

Hi @obermillerk!

Please see #287 and #241.

obermillerk commented 6 years ago

I see... That's a shame. I've managed to set my number inputs up as text inputs with special keyboards that only have number keys. The min and step attributes still seem to work for text inputs so I still have the functionality that I need. Thanks for the quick response!