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

Ensure value for OPTION elements is properly set in edge case (fix #4956) #4959

Merged
merged 2 commits into from Nov 25, 2021

Conversation

LinusBorg
Copy link
Member

This PR covers an edge case where the OPTION element has a textContent matching its assigned value attribute.

Previously, Vue would fail to properly assign the value in this case (and consequently, the value attribute was missing), because for OPTION elements, el.value falls back to el.textContent when no distinct value has been set (yet)

close #4956

@LinusBorg LinusBorg changed the title Linusborg/fix-option-value-4956 Ensure value for OPTION elements is properly set in edge case (fix #4956) Nov 17, 2021
even when they have a matching textContent

close #4956
@LinusBorg LinusBorg force-pushed the linusborg/fix-option-value-4956 branch from 80dc49b to 55e8c54 Compare November 17, 2021 16:25
@yyx990803 yyx990803 merged commit 89b2f92 into master Nov 25, 2021
@yyx990803 yyx990803 deleted the linusborg/fix-option-value-4956 branch November 25, 2021 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

select option value attribute is not set if value is equal to text
2 participants