Skip to content

Commit ecdf119

Browse files
committed
fix(ngShow/ngHide): revert to display:'' for show
Regression introduced by ngAnimation SHA: 0b6f1ce
1 parent 820253f commit ecdf119

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/ng/animator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ var $AnimatorProvider = function() {
283283
}
284284

285285
function show(element) {
286-
element.css('display', 'block');
286+
element.css('display', '');
287287
}
288288

289289
function hide(element) {

test/ng/animatorSpec.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ describe("$animator", function() {
5050
element.css('display','none');
5151
expect(element.css('display')).toBe('none');
5252
animator.show(element);
53-
expect(element.css('display')).toBe('block');
53+
expect(element[0].style.display).toBe('');
5454
}));
5555

5656
it("should animate the hide animation event", inject(function($animator, $compile, $rootScope) {
@@ -125,9 +125,9 @@ describe("$animator", function() {
125125
element.css('display','none');
126126
expect(element.css('display')).toBe('none');
127127
animator.show(element);
128-
expect(element.css('display')).toBe('block');
128+
expect(element[0].style.display).toBe('');
129129
window.setTimeout.expect(1).process();
130-
expect(element.css('display')).toBe('block');
130+
expect(element[0].style.display).toBe('');
131131
}));
132132

133133
it("should animate the hide animation event", inject(function($animator, $rootScope) {

0 commit comments

Comments
 (0)