-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
v-bind:style
not binding certain properties
#5074
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
Comments
Hi, thanks for filling this issue. document.body.style.cursor = 'grab' Browsers simply ignore css properties they can't recognize when setting style with javascript. As for applying prefixed style objects (e.g. |
Thanks for the quick response (and for the PR)!
Then I guess I'm misreading the docs (or it needs to be updated)?
|
Oops, sorry I was wrong about that. Vue does automatically add prefixes to property names, but not property values. Perhaps this should be noted in the docs.. |
No problem! That makes sense, thanks! For now, how can I achieve this? I thought about returning something like |
For now, the only way is using |
Closing as the PR has been merged. #5460 |
Uh oh!
There was an error while loading. Please reload this page.
Versions
Vue 2.2.1
Chrome 56.0.2924.87 (64-bit)
Windows 10
Reproduction Link
https://jsfiddle.net/zey5eL5v/
Steps to reproduce
Testing on Chrome, bind
{ cursor: 'grab' }
to an element'sstyle
attribute.What is Expected?
At least on Chrome,
style
should be assignedcursor: -webkit-grab
(noting that it should also be autoprefixed).What is actually happening?
On Firefox,
style
is assignedcursor: grab
(works as expected). On Chrome, the element doesn't receive astyle
attribute.I'm guessing Vue is simply ignoring the property because it's not recognized by Chrome.
The text was updated successfully, but these errors were encountered: