Skip to content

Commit 13513b7

Browse files
committed
fix(button): use animationFrameScheduler in place of requestAnimationFrame
Closes #16638
1 parent 791f620 commit 13513b7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

projects/igniteui-angular/src/lib/directives/button/button-base.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
AfterViewInit,
1212
} from '@angular/core';
1313
import { PlatformUtil } from '../../core/utils';
14+
import { animationFrameScheduler } from 'rxjs';
1415

1516
export const IgxBaseButtonType = {
1617
Flat: 'flat',
@@ -110,7 +111,7 @@ export abstract class IgxButtonBaseDirective implements AfterViewInit{
110111
if (this._platformUtil.isBrowser && !this._viewInit) {
111112
this._viewInit = true;
112113

113-
requestAnimationFrame(() => {
114+
animationFrameScheduler.schedule(() => {
114115
this.element.nativeElement.style.removeProperty('--_init-transition');
115116
});
116117
}

0 commit comments

Comments
 (0)