![Firefox logo](https://assets-prod.sumo.prod.webservices.mozgcp.net/media/uploads/products/2020-04-14-08-36-13-8dda6f.png)
full stop (period) key not working in certain text boxes (Firefox 42.0)
I'm running Firefox 42.0 on a Windows 10 Pro PC. For some time now the full stop (period) key on the numbers keypad has stopped working in certain text boxes. It works fine in other text boxes (e.g. this one). It happens most commonly in text boxes relating to payments so if I type in 19.99 it appears as 1999. The full stop key in the main part of the keyboard works fine in any text box. I've tried 2 different keyboards and the same thing happens. And yes, I have numlock on. Anyone else had this?
Alle Antworten (7)
Hmm, the numeric keypad sends different codes than the main part of the keyboard, but someone should have accounted for that.
Could you give a link to a form that has this problem and point out which field it is that won't accept that period?
http://www.ebay.co.uk/sch/i.html?_from=R40&_trksid=m570.l1313&_nkw=tablet&_sacat=0 - on the far left, grey section of the page there is a section to select the price range. If I enter 2.99 in the box it shows as 299. The same page is fine in Edge browser.
It works for me using a Microsoft keyboard and the U.S. English version of Firefox. The field has a feature I haven't used before:
<input class="price" pattern="\d*" size="6" maxlength="13" name="_udlo" id="e1-61" value="" type="text">
In theory, that should only allow digits (https://developer.mozilla.org/docs/We.../Constraint_validation#Validation-related_attributes) but it doesn't seem to be working on mine, I can type letters.
Needs a little further investigation.
Geändert am
Okay, upon further review, the "pattern" isn't enforced by Firefox as you type, it's a way for sites to validate input if they wish to do so. I'm not sure why the period on your numeric keypad isn't registering in that form but the regular period key is.
Could you try the box on the following test page to see what codes your keyboard is submitting for the regular period and the numeric keypad period:
http://dev.jeffersonscher.com/dom/keyevents2.html
This is what I'm getting:
(regular) keydown => 190 keypress => 46 keyup => 190
(numeric keypad) keydown => 110 keypress => 46 keyup => 110
I got:
keydown => 190 keypress => 46 keyup => 190 keydown => 110 keypress => 46 keyup => 110
i.e. same as you
Does it make a difference whether you use a '.' or a ',' in case the local language matters (en-GB)?
It works if I enter ","