You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Inspect the select options and see that the option with value === textContent has no value set.
What is expected?
Regardless of the textContent I expected an option to correctly have the value attribute and not silently remove it.
What is actually happening?
The value attribute is removed.
I have verified that this is not happening in vue2. Reproduction link
If I'm missing some part of the option spec please point me to it. But as far as I am seeing it it is perfectly valid to have an option with value = textContent and I our case needed for e2e testing frameworks like Selenium to select a predefined value.
The text was updated successfully, but these errors were encountered:
then, when attempting to set the value prop, we compare the new, incoming value to the existing one - and only set the property if there's a difference,.
Problem is: el.value returns the textContent when no value prop is set.
So el.value === newValue is returning true even though there's no value being set yet - but we skip setting it because of the appearant equality between "old" and "new" value
Not sure about the best solution yet - set element Text after setting the value prop isn't gonna work as we do it before explicitly so that <select value> works.
So we might need some edge case handling in patchDOMProp()'s implementation?
Version
3.2.22
Reproduction link
sfc.vuejs.org/
Steps to reproduce
Inspect the select options and see that the option with
value === textContent
has no value set.What is expected?
Regardless of the textContent I expected an option to correctly have the value attribute and not silently remove it.
What is actually happening?
The value attribute is removed.
I have verified that this is not happening in vue2. Reproduction link
If I'm missing some part of the option spec please point me to it. But as far as I am seeing it it is perfectly valid to have an option with value = textContent and I our case needed for e2e testing frameworks like Selenium to select a predefined value.
The text was updated successfully, but these errors were encountered: