diff options
| author | Misko Hevery | 2013-04-03 14:55:03 -0700 |
|---|---|---|
| committer | Misko Hevery | 2013-04-03 15:20:53 -0700 |
| commit | ecdf119a76476f2a57105a3170be4075e43765c3 (patch) | |
| tree | d9f147aaaddb9a2f0079c81be1e334425ee80153 | |
| parent | 820253f6708731388a47bc65124e2a457f0536d8 (diff) | |
| download | angular.js-ecdf119a76476f2a57105a3170be4075e43765c3.tar.bz2 | |
fix(ngShow/ngHide): revert to display:'' for show
Regression introduced by ngAnimation
SHA: 0b6f1ce5f89f47f9302ff1e8cd8f4b92f837c413
| -rw-r--r-- | src/ng/animator.js | 2 | ||||
| -rw-r--r-- | test/ng/animatorSpec.js | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/ng/animator.js b/src/ng/animator.js index 059e7684..f3714db8 100644 --- a/src/ng/animator.js +++ b/src/ng/animator.js @@ -283,7 +283,7 @@ var $AnimatorProvider = function() { } function show(element) { - element.css('display', 'block'); + element.css('display', ''); } function hide(element) { diff --git a/test/ng/animatorSpec.js b/test/ng/animatorSpec.js index d8ceffab..07bcb36c 100644 --- a/test/ng/animatorSpec.js +++ b/test/ng/animatorSpec.js @@ -50,7 +50,7 @@ describe("$animator", function() { element.css('display','none'); expect(element.css('display')).toBe('none'); animator.show(element); - expect(element.css('display')).toBe('block'); + expect(element[0].style.display).toBe(''); })); it("should animate the hide animation event", inject(function($animator, $compile, $rootScope) { @@ -125,9 +125,9 @@ describe("$animator", function() { element.css('display','none'); expect(element.css('display')).toBe('none'); animator.show(element); - expect(element.css('display')).toBe('block'); + expect(element[0].style.display).toBe(''); window.setTimeout.expect(1).process(); - expect(element.css('display')).toBe('block'); + expect(element[0].style.display).toBe(''); })); it("should animate the hide animation event", inject(function($animator, $rootScope) { |
