-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
button type="reset" won't work correctly as various form field attributes are set through element properties, not as attributes #6007
Comments
Notice that changes made to the value of the option tag react directly to the DOM, while the Input tag does not. I'll write a patch to fix it. |
@zhmushan I checked the fix and approved the PR yesterday. Is there anything else that I can do? Also, is the fix going into a release anytime soon? |
The fix will not be released soon. There is a temporary solution that may be of interest to you: <input type="text" ^value="text input value" /> |
The temp fix unfortunately doesn't seem feasible from a back-end perspective and I don't want to run a script that adds the properties back to the DOM. |
Any updates on this issue? It's still not fixed with release 3.2.38 |
Which is why this issue is still open. It seems it simply got unnoticed for a while and then moved too far back in the backlog. Should definitely be fixed though. |
I'd also be interested to understand why the workaround is not " feasable from a backend perspective" in order to better understand the impact. Technically, forcing these props to be set as attributes (with the |
@LinusBorg "Not feasible" was perhaps a bit of a strong statement. The form fields are rendered through a library in a Python/Django system, and it would require some research time to find out how to add the custom properties Btw, a related issue with Vue being the "DOM police": When using the (invalid) value of % on an image width/height property, Vue converts it to "0". |
Getting close to 1 year anniversary. Would be great if this could be fixed instead of a workaround hack. |
Vue version
3.2.36
Link to minimal reproduction
sfc.vuejs.org
Steps to reproduce
What is expected?
The form fields should be set to or stay at their initial values
Select: "option two"
Checkbox: checked
Text: "text input value"
What is actually happening?
The select is set to first option and the other fields are cleared.
System Info
Reproducible in sfc.vuejs.org, code sandbox, Vue CLI, and custom build. Firefox, Chrome, Vivaldi. Windows, Mac, Linux
Any additional comments?
Inspect the code to see that the attributes selected, checked and value="text input value" have been removed in the Vue instance.
The text was updated successfully, but these errors were encountered: