-
Notifications
You must be signed in to change notification settings - Fork 552
[question] about rules of setting max attribute after setting value in <progress> element #1024
Comments
Interesting - it depends when the normalisation step happens. Firefox behaves like blink - but Edge does the normalisation so you get 1/100 - which seems like it is actually correct according to spec. @travisleithead @bzbarsky @hober @cynthia should we normalise the common behaviour... which would mean filing a bug on Edge and specify timing for how clamping values happens, or should we try to change the others to match what the spec seems to say and then clarify what in the spec meant it wasn't implemented like that? |
Fwiw, the Gecko implementation is that the clamping happens when you ask. That is, the "current value" is not actually stored anywhere; it's just computed when someone (like layout) needs it. All that said, the spec as currently written is nonsensical, imo, and the Edge behavior is inconsistent (which is good). If Edge were consistent, it would render I would argue that similarly no one wants the linked demo to behave as it does in Edge. Order in which attributes are set really should not affect the resulting state; any time it does that's a bug in the platform. |
Fix #1024 * make "in/determinate progress bars" (which were used as terms) a proper defined term * refactor to gather requirements accordingly Hopefully clarify sufficiently that the behaviour depending on attribute order in source is obviously a bug.
(In passing, note that Firefox presents |
Fix #1024 * make "in/determinate progress bars" (which were used as terms) a proper defined term * refactor to gather requirements accordingly Hopefully clarify sufficiently that the behaviour depending on attribute order in source is obviously a bug.
As https://w3c.github.io/html/sec-forms.html#the-progress-element says:
So in demo https://jsfiddle.net/r5gohw4w/
If we set
50
tovalue
first (before setting100
tomax
), the current value (50) is greater than the maximum value (1.0). So the current value will be set as1
. And then we set100
tomax
so at the end the position of the<progress>
element should be 1/100.Is that correct? But in Safari & Chrome it always be 50/100.
Thanks.
The text was updated successfully, but these errors were encountered: