Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<progress value={0}> behaves differently between Svelte 4 and 5 #13686

Closed
Rich-Harris opened this issue Oct 19, 2024 · 2 comments · Fixed by #13924
Closed

<progress value={0}> behaves differently between Svelte 4 and 5 #13686

Rich-Harris opened this issue Oct 19, 2024 · 2 comments · Fixed by #13924
Assignees
Labels

Comments

@Rich-Harris
Copy link
Member

Describe the bug

Reproduction

above

Logs

No response

System Info

next

Severity

annoyance

@adiguba
Copy link
Contributor

adiguba commented Oct 19, 2024

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...

@adiguba
Copy link
Contributor

adiguba commented Oct 19, 2024

It seem that the change come from #13574 in order to handle minlength/maxlength

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants