Permalink
Browse files

Fixes problem with transitions not working on some mobile devices

  • Loading branch information...
1 parent 7fbf12a commit a25b194604c86dfffb72e3bd4ddd1c051fba0f09 @jamessanders committed Mar 4, 2013
Showing with 6 additions and 1 deletion.
  1. +6 −1 src/transition/js/transition-native.js
@@ -10,6 +10,7 @@ var CAMEL_VENDOR_PREFIX = '',
VENDOR_PREFIX = '',
DOCUMENT = Y.config.doc,
DOCUMENT_ELEMENT = 'documentElement',
+ DOCUMENT_STYLE = DOCUMENT[DOCUMENT_ELEMENT].style,
TRANSITION_CAMEL = 'transition',
TRANSITION_PROPERTY_CAMEL = 'transitionProperty',
TRANSFORM_CAMEL = 'transform',
@@ -69,7 +70,11 @@ Transition.HIDE_TRANSITION = 'fadeOut';
Transition.useNative = false;
-if ('transition' in DOCUMENT[DOCUMENT_ELEMENT].style) {
+if ('transition' in DOCUMENT_STYLE
+ && 'transitionProperty' in DOCUMENT_STYLE
+ && 'transitionDuration' in DOCUMENT_STYLE
+ && 'transitionTimingFunction' in DOCUMENT_STYLE
+ && 'transitionDelay' in DOCUMENT_STYLE) {
Transition.useNative = true;
Transition.supported = true; // TODO: remove
} else {

0 comments on commit a25b194

Please sign in to comment.