Skip to content
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

Numpad comma not working #36

Closed
Stiropor opened this issue Oct 17, 2013 · 3 comments
Closed

Numpad comma not working #36

Stiropor opened this issue Oct 17, 2013 · 3 comments
Assignees

Comments

@Stiropor
Copy link

There is a problem with this plugin not detecting decimal comma on numeric pad, works fine on comma key otherwise. This is the configuration I'm using:

$('#inputValue,#inputValueYear').number(true, 2, ',', '.' );

To temporary fix this I've changed line 101 from
110 : 46 //IE Key codes
to
110 : 44 //IE Key codes
and it works now.... but no idea what else I've broken with this. Is there a better way to fix this since "IE Key codes" are probably there for a reason?

@vicgor
Copy link
Contributor

vicgor commented Oct 17, 2013

You can to use my plugin https://github.com/vicgor/decimalKeys

@samatcd
Copy link
Member

samatcd commented Oct 25, 2013

@vicgor, huh - nice. I'll look at building that detection in for those key codes.

@ghost ghost assigned samatcd Oct 25, 2013
janher added a commit to janher/jquery-number that referenced this issue Apr 25, 2014
This is my solution for issue customd#36 (decimal point on numpad not working).
The keycode for the numpad decimal point was translated to the keycode for "delete". I removed the translation because in IE, FF and chrome the key on the numpad gives the keycode for "decimal point" when the numlock is on, and delete when it is off.

Further down, I added an extra if-condition to translate the decimal point key to whatever character has been set as the decimal separator.
samatcd pushed a commit that referenced this issue May 14, 2014
@samatcd
Copy link
Member

samatcd commented Sep 8, 2014

Decimal and comma detection should be much more reliable in fe79732.

@samatcd samatcd closed this as completed Sep 8, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants