Numpad decimal separator does not work on IE11 with a keyboard whose numpad decimal key outputs a comma
See original GitHub issueCurrent behavior
The numpad decimal separator on german keyboards produces a ,
(comma). When setting decimalCharacter
to ,
(comma) and digitGroupSeparator
to .
(dot), the numpad decimal separator on a german keyboard is not recognized as ,
(comma) in IE11 (although it produces a ,
(comma) event.char
) and thus not allowed as input. It works flawless in current versions of Firefox and Chrome.
It also works when setting decimalCharacterAlternative
to .
(dot), however, that should not be necessary as per documentation.
Expected behavior
The numpad decimal separator should be accepted as ,
(comma).
Steps to reproduce the problem
- Use autoNumeric version
4.4.0
- In the browser
Internet Explorer
version11
- On the
Windows
operating system - Then instantiate the autoNumeric object with the following options:
new AutoNumeric(domElement, {digitGroupSeparator: '.', decimalCharacter: ','});
- Numad decimal character on german keyboard can not be entered.
Link to live example (ie. Codepen)
The issue is reproducible on the autonumeric home page (http://autonumeric.org/) when scrolling down to the example and selecting the third example provided (the separate examples page can not be used in IE11 either, but that’s a different problem)
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (7 by maintainers)
Top GitHub Comments
Using your jsfiddle, when I use my numpad
.
key, I get[NumpadDecimal Delete #46 undefined]
. This is under Firefox67.0b13
, with theus_intl
keyboard layout (and a Dvorak keyboard). Under Chromium73
, I get[NumpadDecimal #46 undefined]
.I checked under Firefox, Chromium, Firefox for android and Chrome for android, and will take your words for Safari and Edge, and indeed
event.char
isundefined
for those main browsers.I’ll merge @McNetic PR, thank you both for your researches!
I’ll publish the updated version as soon as I manage to fix all the unit and e2e tests that became red after I updated the dependencies :x
FYI, a new version 4.5.6 has been released, which includes this fix. Thanks @AlexandreBonneau !
I tested the new release, and can confirm that the fix works for IE 11 and there’s no regression (tested with current version of Firefox)