-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
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
"open" seems to be a reserved prop name? #10381
Comments
Seems someone else is having the same issue, a pr is already opened for this: #10088 |
Duplicate of #10087 |
Vue has been treating all attributes as global attributes, which is technically kind of over-simplified. |
Not if it is in a v-pre component. In my opinion Vue should not mutate attributes of 'normal' html tags. |
Unfortunately we need to mutate them sometimes so it works across browsers. It shouldn't happen with v-pre but that's different and it's already tracked at #10087 |
Version
2.6.10
Reproduction link
https://jsfiddle.net/qagby1e4/
Steps to reproduce
Somehow if I use the attribute "open" on a html tag, vue fills the attribute with the value "open". See the attached jfiddle, and inspect the span containing the attribute. If I put the tag outside the vue app, everything is fine. Also, it doesn't matter what the content of the attribute is.
What is expected?
Vue doesn't mutate the attribute "open" on html tags inside the vue app.
What is actually happening?
Vue mutates the "open" attribute with the value "open".
It doesn't seem to be a reserved keyword, although this file https://github.com/vuejs/vue/blob/dev/src/platforms/web/util/attrs.js does specify it as a boolean attribute. In our case, a mathjax html structure, the open attribute can contain string values.
The text was updated successfully, but these errors were encountered: