diff --git a/src/modal/modal-container.component.ts b/src/modal/modal-container.component.ts index e8583e2eae..fc6abd20fb 100644 --- a/src/modal/modal-container.component.ts +++ b/src/modal/modal-container.component.ts @@ -102,8 +102,8 @@ export class ModalContainerComponent implements OnInit, OnDestroy { @HostListener('window:popstate') onPopState(): void { - this.hide(); this.bsModalService.setDismissReason(DISMISS_REASONS.BACK); + this.hide(); } @HostListener('window:keydown.esc', ['$event']) diff --git a/src/modal/modal-options.class.ts b/src/modal/modal-options.class.ts index 03a04d16bd..12fdf2fe80 100644 --- a/src/modal/modal-options.class.ts +++ b/src/modal/modal-options.class.ts @@ -90,5 +90,5 @@ export const TRANSITION_DURATIONS: TransitionDurations = { export const DISMISS_REASONS: DismissReasons = { BACKRDOP: 'backdrop-click', ESC: 'esc', - BACK: 'broswer-back-navigation-clicked' + BACK: 'browser-back-navigation-clicked' };