Skip to content

Commit

Permalink
Fix ion-backdrop scroll block on navigation return (#2906)
Browse files Browse the repository at this point in the history
  • Loading branch information
mictro authored and SigurdVilstrup committed Mar 21, 2023
1 parent 423b28c commit 676119c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion libs/designsystem/fab-sheet/src/fab-sheet.component.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { CommonModule, DOCUMENT } from '@angular/common';
import {
AfterContentInit,
AfterViewInit,
ChangeDetectionStrategy,
ChangeDetectorRef,
Component,
Expand All @@ -23,7 +24,7 @@ import { ActionSheetComponent } from '@kirbydesign/designsystem/modal';
styleUrls: ['./fab-sheet.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class FabSheetComponent implements AfterContentInit {
export class FabSheetComponent implements AfterContentInit, AfterViewInit {
@Input() disabled: boolean = false;
@Input() horizontalAlignment: 'left' | 'center' | 'right' = 'right';

Expand Down Expand Up @@ -53,6 +54,10 @@ export class FabSheetComponent implements AfterContentInit {
}
}

ngAfterViewInit(): void {
this.renderer.removeClass(this.document.body, 'backdrop-no-scroll');
}

hideActions() {
this.ionFab.close().then(() => this.fabSheetStateChanged(false));
}
Expand Down

0 comments on commit 676119c

Please sign in to comment.