Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Input type=number in Safari #2928

Closed
iabdulin opened this issue Nov 4, 2011 · 4 comments
Closed

Input type=number in Safari #2928

iabdulin opened this issue Nov 4, 2011 · 4 comments

Comments

@iabdulin
Copy link

iabdulin commented Nov 4, 2011

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.

@toddparker
Copy link
Contributor

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.

@iabdulin
Copy link
Author

iabdulin commented Nov 5, 2011

Maybe it's just easier to not specify type=number on input?
What is the point of using the 'degrade inputs plugin'?

On 2011-11-04, at 8:37 AM, Todd Parker wrote:

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.


Reply to this email directly or view it on GitHub:
#2928 (comment)

Ildar Abdulin
ildar.abdulin@gmail.com

@toddparker
Copy link
Contributor

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.

.................................. . . . .
Todd Parker
Partner, Filament Group Inc.
102 South Street #3 Boston, MA 02111
todd@filamentgroup.com // 617.953.1617

On Nov 4, 2011, at 8:48 PM, "iabdulin" reply@reply.github.com wrote:

Maybe it's just easier to not specify type=number on input?
What is the point of using the 'degrade inputs plugin'?

On 2011-11-04, at 8:37 AM, Todd Parker wrote:

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.


Reply to this email directly or view it on GitHub:
#2928 (comment)

Ildar Abdulin
ildar.abdulin@gmail.com


Reply to this email directly or view it on GitHub:
#2928 (comment)

@iabdulin
Copy link
Author

iabdulin commented Nov 5, 2011

I still don't understand:
how will input type=number degrade with plugin? will it become a simple input?
then, I guess, it will be just a simple input for any browser, without any additional benefits...

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:

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.

.................................. . . . .
Todd Parker
Partner, Filament Group Inc.
102 South Street #3 Boston, MA 02111
todd@filamentgroup.com // 617.953.1617

On Nov 4, 2011, at 8:48 PM, "iabdulin" reply@reply.github.com wrote:

Maybe it's just easier to not specify type=number on input?
What is the point of using the 'degrade inputs plugin'?

On 2011-11-04, at 8:37 AM, Todd Parker wrote:

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.


Reply to this email directly or view it on GitHub:
#2928 (comment)

Ildar Abdulin
ildar.abdulin@gmail.com


Reply to this email directly or view it on GitHub:
#2928 (comment)


Reply to this email directly or view it on GitHub:
#2928 (comment)

Ildar Abdulin
ildar.abdulin@gmail.com

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants