Degree53 / carpentry

A library of highly customisable React components

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DecimalInput - Issues with decimal input

brins0 opened this issue · comments

There's an issue when entering a decimal point using the numeric keyboard in Edge or IE. Using the . in the text area of the keyboard works as expected, but using the . on the numeric area doesn't work. This is fine in all other tested browsers, and is fine when triggering it using the triggerKeypress function in the API.

Should be resolved by #6

As you correctly identified, it's a bug in IE that reports the Event.key of the '.' key as delete. This will unfortunately need an IE specific fix.

Fixed for now by #6 however there is a potential future issue if Microsoft remove Event.charCode support before fixing their implementation of Event.key. Settled with this fix because the only alternative would require user agent sniffing which is gross.