Browse Source
Merge pull request #19545 from abpframework/issue-19310
Update logic of showing a confirmation before refreshing the page
pull/19553/head
Masum ULU
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
1 additions and
2 deletions
-
npm/ng-packs/packages/theme-shared/src/lib/components/modal/modal.component.ts
|
|
|
@ -206,8 +206,7 @@ export class ModalComponent implements OnInit, OnDestroy, DismissableModal { |
|
|
|
fromEvent(window, 'beforeunload') |
|
|
|
.pipe(takeUntil(this.destroy$)) |
|
|
|
.subscribe(event => { |
|
|
|
// TODO: check this
|
|
|
|
if (!this.isFormDirty || this.suppressUnsavedChangesWarning) { |
|
|
|
if (this.isFormDirty && !this.suppressUnsavedChangesWarning) { |
|
|
|
event.preventDefault(); |
|
|
|
} |
|
|
|
}); |
|
|
|
|