Skip to content

Commit 0064b42

Browse files
authored
fix(material/tabs): remove IE animation workaround (#29899)
Removes a workaround that's no longer necessary now that we don't support IE.
1 parent fa0f514 commit 0064b42

File tree

1 file changed

+10
-18
lines changed

1 file changed

+10
-18
lines changed

src/material/tabs/tab-body.ts

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import {
2626
inject,
2727
} from '@angular/core';
2828
import {Subject, Subscription} from 'rxjs';
29-
import {distinctUntilChanged, startWith} from 'rxjs/operators';
29+
import {startWith} from 'rxjs/operators';
3030
import {matTabsAnimations} from './tabs-animations';
3131

3232
/**
@@ -174,24 +174,16 @@ export class MatTabBody implements OnInit, OnDestroy {
174174
});
175175
}
176176

177-
// Ensure that we get unique animation events, because the `.done` callback can get
178-
// invoked twice in some browsers. See https://github.com/angular/angular/issues/24084.
179-
this._translateTabComplete
180-
.pipe(
181-
distinctUntilChanged((x, y) => {
182-
return x.fromState === y.fromState && x.toState === y.toState;
183-
}),
184-
)
185-
.subscribe(event => {
186-
// If the transition to the center is complete, emit an event.
187-
if (this._isCenterPosition(event.toState) && this._isCenterPosition(this._position)) {
188-
this._onCentered.emit();
189-
}
177+
this._translateTabComplete.subscribe(event => {
178+
// If the transition to the center is complete, emit an event.
179+
if (this._isCenterPosition(event.toState) && this._isCenterPosition(this._position)) {
180+
this._onCentered.emit();
181+
}
190182

191-
if (this._isCenterPosition(event.fromState) && !this._isCenterPosition(this._position)) {
192-
this._afterLeavingCenter.emit();
193-
}
194-
});
183+
if (this._isCenterPosition(event.fromState) && !this._isCenterPosition(this._position)) {
184+
this._afterLeavingCenter.emit();
185+
}
186+
});
195187
}
196188

197189
/**

0 commit comments

Comments
 (0)