From cecb9a49e6cced04b362f0f0c24f79138fc6a0ee Mon Sep 17 00:00:00 2001 From: iBobo Date: Wed, 3 Feb 2016 12:37:38 +0100 Subject: [PATCH 1/3] Edge 13 doesn't make animations with value auto Solving a bug in Microsoft Edge where the animation is not even started when the starting value is auto, much like Firefox; adding an OR to detect Edge in the Firefox handling code, does the trick. --- dom/animate/animate.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dom/animate/animate.js b/dom/animate/animate.js index 47f965b5..e46addb9 100644 --- a/dom/animate/animate.js +++ b/dom/animate/animate.js @@ -284,8 +284,9 @@ steal('jquery', function ($) { properties.push(prop); } - if(getBrowser().prefix === '-moz-') { + if(getBrowser().prefix === '-moz-' || /Edge\/\d+/.test(navigator.userAgent)) { // Normalize 'auto' properties in FF + // This is also needed in Edge (tested in 13) $.each(properties, function(i, prop) { var converter = ffProps[$.camelCase(prop)]; if(converter && self.css(prop) == 'auto') { From c9fbe8c01210543f08d00015d14731c399a671df Mon Sep 17 00:00:00 2001 From: Curtis Cummings Date: Tue, 5 Apr 2016 11:02:37 -0700 Subject: [PATCH 2/3] Fix transitionend event to match spec Upgrade Testee Fix animation tests for jQuery 2.2.x --- dom/animate/animate.js | 8 ++------ dom/animate/animate_test.js | 26 ++++++++++++++------------ package.json | 2 +- 3 files changed, 17 insertions(+), 19 deletions(-) diff --git a/dom/animate/animate.js b/dom/animate/animate.js index e46addb9..a91ee4b8 100644 --- a/dom/animate/animate.js +++ b/dom/animate/animate.js @@ -90,19 +90,15 @@ steal('jquery', function ($) { el = document.createElement('fakeelement'), transitions = { 'transition': { - transitionEnd : 'transitionEnd', + transitionEnd : 'transitionend', prefix : '' }, -// 'MSTransition': { -// transitionEnd : 'msTransitionEnd', -// prefix : '-ms-' -// }, 'MozTransition': { transitionEnd : 'animationend', prefix : '-moz-' }, 'WebkitTransition': { - transitionEnd : 'webkitAnimationEnd', + transitionEnd : 'webkitTransitionEnd', prefix : '-webkit-' }, 'OTransition': { diff --git a/dom/animate/animate_test.js b/dom/animate/animate_test.js index f2eef5de..3c512823 100644 --- a/dom/animate/animate_test.js +++ b/dom/animate/animate_test.js @@ -1178,14 +1178,14 @@ steal('jquery', expect(11); stop(); - var _default_count = 0, + var _def_count = 0, _special_count = 0, propsBasic = { "padding": "10 20 30" }, propsSpecial = { "padding": [ "1 2 3", "_special" ] }; - $.easing._default = function(p) { + $.easing._def = function(p) { if ( p >= 1 ) { - _default_count++; + _def_count++; } return p; }; @@ -1198,24 +1198,24 @@ steal('jquery', }; jQuery("#foo") - .animate( propsBasic, 200, "_default", function() { + .animate( propsBasic, 200, "_def", function() { equal( this.style.paddingTop, "10px", "padding-top was animated" ); equal( this.style.paddingLeft, "20px", "padding-left was animated" ); equal( this.style.paddingRight, "20px", "padding-right was animated" ); equal( this.style.paddingBottom, "30px", "padding-bottom was animated" ); - equal( _default_count, 4, "per-animation default easing called for each property" ); - _default_count = 0; + equal( _def_count, 4, "per-animation default easing called for each property" ); + _def_count = 0; }) - .animate( propsSpecial, 200, "_default", function() { + .animate( propsSpecial, 200, "_def", function() { equal( this.style.paddingTop, "1px", "padding-top was animated again" ); equal( this.style.paddingLeft, "2px", "padding-left was animated again" ); equal( this.style.paddingRight, "2px", "padding-right was animated again" ); equal( this.style.paddingBottom, "3px", "padding-bottom was animated again" ); - equal( _default_count, 0, "per-animation default easing not called" ); + equal( _def_count, 0, "per-animation default easing not called" ); equal( _special_count, 4, "special easing called for each property" ); jQuery(this).css("padding", "0"); - delete $.easing._default; + delete $.easing._def; delete $.easing._special; start(); }); @@ -1693,7 +1693,7 @@ steal('jquery', }); });*/ - asyncTest("Animation callbacks (#11797)", 15, function() { + asyncTest("Animation callbacks (#11797)", 16, function() { var targets = jQuery("#foo").children(), done = false, expectedProgress = 0; @@ -1704,7 +1704,8 @@ steal('jquery', ok( true, "empty: start" ); }, progress: function( anim, percent ) { - equal( percent, 0, "empty: progress 0" ); + equal( percent, expectedProgress, "empty: progress " + expectedProgress ); + expectedProgress++; }, done: function() { ok( true, "empty: done" ); @@ -1744,7 +1745,8 @@ steal('jquery', }).stop(); ok( done, "stopped: stopped immediately" ); - + + expectedProgress = 0; targets.eq( 2 ).animate({ opacity: 0 }, { diff --git a/package.json b/package.json index ed363a8d..cdc9057f 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "steal-tools": "^0.8.2", "syn": "0.1.X", "system-text": "0.1.0", - "testee": "^0.1.8" + "testee": "^0.2.5" }, "main": "./index", "system": { From 6bd2f1429d184f87ab98172bf91a9bb32465cc6e Mon Sep 17 00:00:00 2001 From: Curtis Cummings Date: Tue, 5 Apr 2016 17:02:14 -0700 Subject: [PATCH 3/3] Add release scripts to package.json --- package.json | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index cdc9057f..b9f56ede 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,14 @@ "jquery": ">1.9.0" }, "scripts": { - "test": "grunt test --stack" + "preversion": "npm test && npm run build", + "version": "git commit -am \"Update dist for release\" && git checkout -b release && git add -f dist/", + "postversion": "git push --tags && git checkout master && git branch -D release && git push", + "release:patch": "npm version patch && npm publish", + "release:minor": "npm version minor && npm publish", + "release:major": "npm version major && npm publish", + "test": "grunt test --stack", + "build": "grunt build" }, "devDependencies": { "grunt": "^0.4.5",