diff options
| author | Matias Niemelä | 2013-08-21 15:03:41 -0400 |
|---|---|---|
| committer | Misko Hevery | 2013-08-23 14:04:35 -0700 |
| commit | ee2f3d21da6c9fccfe1e6a4ea8a65627519c8bf2 (patch) | |
| tree | fae875a458eb632e583871ea7c35963c5b624f68 /docs | |
| parent | fb3a7db0809b959d50be4cb93a65a91200071dd5 (diff) | |
| download | angular.js-ee2f3d21da6c9fccfe1e6a4ea8a65627519c8bf2.tar.bz2 | |
fix($animate): only execute a timeout when transitions or keyframe animations are used
ngAnimate causes a 1ms flicker on the screen when no CSS animations are present on the element.
The solution is to change $animate to only use $timeouts when a duration is found on the element
before the transition/keyframe animation takes over.
Closes #3613
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/component-spec/annotationsSpec.js | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/docs/component-spec/annotationsSpec.js b/docs/component-spec/annotationsSpec.js index d84bd5bd..f1acd64e 100644 --- a/docs/component-spec/annotationsSpec.js +++ b/docs/component-spec/annotationsSpec.js @@ -118,15 +118,13 @@ describe('Docs Annotations', function() { expect(foldout.html()).toContain('loading'); })); - it('should download a foldout HTML page and animate the contents', inject(function($httpBackend, $timeout) { + it('should download a foldout HTML page and animate the contents', inject(function($httpBackend, $timeout, $sniffer) { $httpBackend.expect('GET', url).respond('hello'); element.triggerHandler('click'); $httpBackend.flush(); $timeout.flushNext(0); - $timeout.flushNext(1); - $timeout.flushNext(0); $timeout.flushNext(1000); var kids = body.children(); @@ -134,27 +132,22 @@ describe('Docs Annotations', function() { expect(foldout.text()).toContain('hello'); })); - it('should hide then show when clicked again', inject(function($httpBackend, $timeout) { + it('should hide then show when clicked again', inject(function($httpBackend, $timeout, $sniffer) { $httpBackend.expect('GET', url).respond('hello'); //enter element.triggerHandler('click'); $httpBackend.flush(); $timeout.flushNext(0); - $timeout.flushNext(1); - $timeout.flushNext(0); $timeout.flushNext(1000); //hide element.triggerHandler('click'); - $timeout.flushNext(1); $timeout.flushNext(0); $timeout.flushNext(200); - $timeout.flushNext(0); //show element.triggerHandler('click'); - $timeout.flushNext(1); $timeout.flushNext(0); $timeout.flushNext(500); $timeout.flushNext(0); |
