New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internet Explorer and floating point numerical inputs #6012

Closed
akloster opened this Issue May 16, 2013 · 4 comments

Comments

Projects
None yet
4 participants
@akloster

I am working on a project where I need German users with IE8 through 10 to input floating point numbers in sliders. The decimal separator for German is "," not ".". In Chrome and Firefox I can input something like "5,5" and it will work as intended. In IE, no such luck, the comma gets deleted.

From my perspective this looks to be a compatibility issue, because the widget in IE doesn't accept the same input as other browsers do.

I don't have a good solution for this yet. I solved it by monkey patching window.parseFloat to replace commas with decimal points. That doesn't solve the display issue, because now the input displays a point-separated decimal.

@jaspermdegroot

This comment has been minimized.

Show comment
Hide comment
@jaspermdegroot

jaspermdegroot May 16, 2013

Member

I tested on Dutch Win7/IE10: http://jsbin.com/ulexaz/16. In NL we also use comma instead of point.

If you look at the native number input IE shows the value with a decimal point, while Chrome and Firefox show a comma here. So the problem starts with lack of i18n in IE.
However, it is possible to enter a comma separated value in the native number input, while the JQM slider input is rounding off to an integer like @akloster reported.
Let's see if we can do something about that when reviewing the slider widget.

Member

jaspermdegroot commented May 16, 2013

I tested on Dutch Win7/IE10: http://jsbin.com/ulexaz/16. In NL we also use comma instead of point.

If you look at the native number input IE shows the value with a decimal point, while Chrome and Firefox show a comma here. So the problem starts with lack of i18n in IE.
However, it is possible to enter a comma separated value in the native number input, while the JQM slider input is rounding off to an integer like @akloster reported.
Let's see if we can do something about that when reviewing the slider widget.

@akloster

This comment has been minimized.

Show comment
Hide comment
@akloster

akloster May 20, 2013

Generally jquery-mobile does not have a framework for internationalization. Probably it shouldn't. But it should provide the necessary hooks. Some developers require Internationalization server-side, some client-side.

I haven't got a perfect solution for the problem. I don't believe it's possible to use the type="number" input without running into this issue, as the browser handles the input formatting on its own. I also tried using Chrome on Nexus 7, and there I have a decimal point, too despite an otherwise completely localized interface.

So maybe the best solution will be to provide a fallback using a string input for now.

Generally jquery-mobile does not have a framework for internationalization. Probably it shouldn't. But it should provide the necessary hooks. Some developers require Internationalization server-side, some client-side.

I haven't got a perfect solution for the problem. I don't believe it's possible to use the type="number" input without running into this issue, as the browser handles the input formatting on its own. I also tried using Chrome on Nexus 7, and there I have a decimal point, too despite an otherwise completely localized interface.

So maybe the best solution will be to provide a fallback using a string input for now.

@ldeluca

This comment has been minimized.

Show comment
Hide comment
@ldeluca

ldeluca Oct 24, 2014

Contributor

Hi @akloster & @jaspermdegroot Just checking on this issue. We're doing some cleanup of issues and there hasn't been any movement on this one for over a year. Can you guys verify if it's still a problem with the latest jQM or if we can close? Thanks!

Contributor

ldeluca commented Oct 24, 2014

Hi @akloster & @jaspermdegroot Just checking on this issue. We're doing some cleanup of issues and there hasn't been any movement on this one for over a year. Can you guys verify if it's still a problem with the latest jQM or if we can close? Thanks!

@arschmitz

This comment has been minimized.

Show comment
Hide comment
@arschmitz

arschmitz Jun 19, 2015

Member

No response in 8 months closing

Member

arschmitz commented Jun 19, 2015

No response in 8 months closing

@arschmitz arschmitz closed this Jun 19, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment