Permalink
Browse files

AnimationComplete: change default to durationDefault fix duration read

Safegurard against NAN values and fix camelcase of duration name

Fixes gh-7114
Fixes gh-7116
Closes gh-7119
  • Loading branch information...
arschmitz committed Feb 14, 2014
1 parent 7850a2f commit 5bbb46a4fc2f1c81095052a9b11c57aeee5075e5
Showing with 3 additions and 4 deletions.
  1. +3 −4 js/jquery.mobile.animationComplete.js
@@ -34,7 +34,6 @@ define( [
// All lower case if not a vendor prop
if ( props[ test ][ "prefix" ] === "" ) {
- props[ test ][ "duration" ] = props[ test ][ "duration" ].toLowerCase();
props[ test ][ "event" ] = props[ test ][ "event" ].toLowerCase();
}
});
@@ -70,8 +69,8 @@ define( [
}
// If we could not read a duration use the default
- if ( duration === 0 || duration === undefined ) {
- duration = $.fn.animationComplete.default;
+ if ( duration === 0 || duration === undefined || isNaN( duration ) ) {
+ duration = $.fn.animationComplete.defaultDuration;
}
}
@@ -98,7 +97,7 @@ define( [
};
// Allow default callback to be configured on mobileInit
- $.fn.animationComplete.default = 1000;
+ $.fn.animationComplete.defaultDuration = 1000;
})( jQuery );
//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
});

0 comments on commit 5bbb46a

Please sign in to comment.