Browse Source

check prefix first when setting style properties (fix #2219)

Evan You 10 years ago
parent
commit
8dd598c210
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/directives/internal/style.js

+ 3 - 3
src/directives/internal/style.js

@@ -100,9 +100,6 @@ function prefix (prop) {
   if (!testEl) {
     testEl = document.createElement('div')
   }
-  if (camel in testEl.style) {
-    return prop
-  }
   var i = prefixes.length
   var prefixed
   while (i--) {
@@ -111,4 +108,7 @@ function prefix (prop) {
       return prefixes[i] + prop
     }
   }
+  if (camel in testEl.style) {
+    return prop
+  }
 }