搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

full stop (period) key not working in certain text boxes (Firefox 42.0)

  • 7 回覆
  • 2 有這個問題
  • 13 次檢視
  • 最近回覆由 dwl99

more options

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?

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?

所有回覆 (7)

more options

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?

more options

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.

more options

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.

由 jscher2000 - Support Volunteer 於 修改

more options

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

more options

I got:

keydown => 190 keypress => 46 keyup => 190 keydown => 110 keypress => 46 keyup => 110

i.e. same as you

more options

Does it make a difference whether you use a '.' or a ',' in case the local language matters (en-GB)?

more options

It works if I enter ","