Closed Bug 1658555 Opened 4 years ago Closed 4 years ago

input element of type number allows arbitrary text input

Categories

(Core :: Layout: Form Controls, defect)

1.0 Branch
defect

Tracking

()

RESOLVED DUPLICATE of bug 1398528

People

(Reporter: peter.carter, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.105 Safari/537.36

Steps to reproduce:

Create an input field of type number, like: <input type="number">. Type words into the resulting field.

Actual results:

The field allows arbitrary text.

Expected results:

According to:

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/number

this should do the same thing as Chromium browers and disallow input of anything that's not a numberal (or at least a mathematical symbol associated with numbers, since Chromium semi-oddly allows 'e').

*numeral

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Layout: Form Controls
Product: Firefox → Core

this should do the same thing as Chromium browers and disallow input of anything that's not a numberal (or at least a mathematical symbol associated with numbers, since Chromium semi-oddly allows 'e').

Why? We allow to input localized numbers, it's not always quite trivial to determine what's a number in that case, fwiw... :)

Anyhow we have bug 1398528 tracking this.

Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.