Open Bug 1756416 Opened 4 years ago Updated 3 years ago

input=range with high-precision step attribute yields invalid values

Categories

(Core :: DOM: Forms, defect)

Firefox 98
defect

Tracking

()

UNCONFIRMED

People

(Reporter: daniel.skogly, Unassigned, NeedInfo)

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:98.0) Gecko/20100101 Firefox/98.0

Steps to reproduce:

  1. Create an input=range with a high-precision step (ie. (2 * Math.PI) / 365)
  2. Click (almost) anywhere on the range track

jsbin:
https://jsbin.com/pigaqewafa/edit?html,output

Actual results:

The new input value is invalid, and yields either a stepMismatch or rangeOverflow (if very last value selected, and max is also set to a high-precision value)

Expected results:

It shouldn't be possible to get an invalid value by simply clicking the range track, nor should it be possible to get a rangeOverflow.

The Bugbug bot thinks this bug should belong to the 'Core::Layout: Form Controls' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

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

Current code was introduced in bug 853525, and Chrome also fails to compare.

jwatt: WDYT?

Flags: needinfo?(jwatt)
Severity: -- → S3
You need to log in before you can comment on or make changes to this bug.