Skip to content
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

Fix issue with Galaxy S3 native browser when applying a transition with duration 0ms #209

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "jquery.transit",
"repo": "rstacruz/jquery.transit",
"description": "Smooth CSS3 transitions and transformations for jQuery.",
"version": "0.9.12",
"version": "0.9.92",
"keywords": [
"css3",
"animation",
Expand Down
2 changes: 1 addition & 1 deletion component.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "jquery.transit",
"repo": "rstacruz/jquery.transit",
"description": "Smooth CSS3 transitions and transformations for jQuery.",
"version": "0.9.12",
"version": "0.9.92",
"keywords": [
"css3",
"animation",
Expand Down
15 changes: 12 additions & 3 deletions jquery.transit.js
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,12 @@
// If there's nothing to do...
if (i === 0) {
var fn = function(next) {
//to correct a bug with the GALAXY S3 native browser
//if never you apply a transtion with duration 0ms after an transition with a duration != 0ms
//with only '$(this).css(theseProperties);' the browser does a transition on GALAXY S3 native browser (webkit custom by Samsung)
//Adding this.style[support.transition] = transitionValue; makes the browser doing the transition with duration 0ms as expected, and no bug has been detected over other browsers
//test on WP8, ios7-safari, android-2.3, android-chrome, android-firefox, computer-chrome, computer-firefox
this.style[support.transition] = transitionValue;
self.css(theseProperties);
if (callback) { callback.apply(self); }
if (next) { next(); }
Expand Down Expand Up @@ -656,9 +662,12 @@

// Apply transitions.
self.each(function() {
if (i > 0) {
this.style[support.transition] = transitionValue;
}
//Remove the i > 0 conditions, to correct a bug with the GALAXY S3 native browser -
//if never you apply a transtion with duration 0ms after an transition with a duration != 0ms
//with only '$(this).css(theseProperties);' the browser does a transition on GALAXY S3 native browser (webkit custom by Samsung)
//Adding this.style[support.transition] = transitionValue; makes the browser doing the transition with duration 0ms as expected, and no bug has been detected over other browsers
//test on WP8, ios7-safari, android-2.3, android-chrome, android-firefox, computer-chrome, computer-firefox
this.style[support.transition] = transitionValue;
$(this).css(theseProperties);
});
};
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jquery.transit",
"version": "0.9.12",
"version": "0.9.92",
"description": "Smooth CSS3 transitions and transformations for jQuery.",
"main": "jquery.transit.js",
"directories": {
Expand Down