-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Input type=number in Safari #2928
Comments
Gah! All the HTML5 form elements are so buggy. Seems like Apple is trying to be smart and add in commas for nice formatting, but is tripping up on it's own formatting. We have a degrade inputs plugin in the library that is designed to take a HTML5 input and convert it into another, safer input type (like text) that you could use in this situation if you want. This would be a better thing to file with Safari, hopefully they will fix soon. |
Maybe it's just easier to not specify type=number on input? On 2011-11-04, at 8:37 AM, Todd Parker wrote:
Ildar Abdulin |
Using the most relevant input type is good because on many mobile platforms, you'll get an optimized keyboard or pocket for faster entry. A type of number opens a numeric keypad on iOS, for example. On desktop, you may get nice UI controls - a numerical input may be a spinner. The downside us that you're at the mercy of buggy browser implementations like your safari bug, but I bet that is fixed soon. Degrade inputs is a tool we use in some cases, like with type=range where we want to use all the semantics and the min/max attributes but don't want the crappy browser slider. In these cases, we use that type to configure our custom slider, then use degrade inputs to make the range a numeric input so it's a useful compliment to our custom slider. .................................. . . . . On Nov 4, 2011, at 8:48 PM, "iabdulin" reply@reply.github.com wrote:
|
I still don't understand: maybe I am totally wrong on how degrade will work for input type=number. On 2011-11-04, at 7:19 PM, Todd Parker wrote:
Ildar Abdulin |
Safari 5.1.1
http://jquerymobile.com/test/docs/forms/textinputs/
Input something in Number field:
123456789
Blur field. Now value is formatted like:
123,456,789
Try to add any number in field:
123,456,7893333
Blur:
value resetted to
123,456,789
The problem is that field finds commas and doesn't like them.
The text was updated successfully, but these errors were encountered: