Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

Commit 5bbb46a

Browse files
committed
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
1 parent 7850a2f commit 5bbb46a

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

js/jquery.mobile.animationComplete.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ define( [
3434

3535
// All lower case if not a vendor prop
3636
if ( props[ test ][ "prefix" ] === "" ) {
37-
props[ test ][ "duration" ] = props[ test ][ "duration" ].toLowerCase();
3837
props[ test ][ "event" ] = props[ test ][ "event" ].toLowerCase();
3938
}
4039
});
@@ -70,8 +69,8 @@ define( [
7069
}
7170

7271
// If we could not read a duration use the default
73-
if ( duration === 0 || duration === undefined ) {
74-
duration = $.fn.animationComplete.default;
72+
if ( duration === 0 || duration === undefined || isNaN( duration ) ) {
73+
duration = $.fn.animationComplete.defaultDuration;
7574
}
7675
}
7776

@@ -98,7 +97,7 @@ define( [
9897
};
9998

10099
// Allow default callback to be configured on mobileInit
101-
$.fn.animationComplete.default = 1000;
100+
$.fn.animationComplete.defaultDuration = 1000;
102101
})( jQuery );
103102
//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
104103
});

0 commit comments

Comments
 (0)