svelte
svelte copied to clipboard
`<progress value={0}>` behaves differently between Svelte 4 and 5
Describe the bug
Reproduction
above
Logs
No response
System Info
next
Severity
annoyance
It seem that the problem come from this check in set_value() : element.value === value
export function set_value(element, value) {
// @ts-expect-error
var attributes = (element.__attributes ??= {});
// @ts-expect-error
if (attributes.value === (attributes.value = value) || element.value === value) return;
// @ts-expect-error
element.value = value;
}
Indeterminate <progress> seem to have an initial value of 0, so this condition is true and the set is not done.
But I don't known why there a double-check here...
It seem that the change come from #13574 in order to handle minlength/maxlength