Skip to content

Commit 855e327

Browse files
committed
Implemented a simpler fix for just Cancel
This solution does not fix the problem when using the Back button. Maybe we don't care?
1 parent 054c5a4 commit 855e327

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/SIL.XForge.Scripture/ClientApp/src/app/translate/draft-generation/draft-usfm-format/draft-usfm-format.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ <h1>{{ t("formatting_options") }}</h1>
5858
</form>
5959

6060
<div class="actions">
61-
<button mat-button class="back" (click)="close()"><mat-icon>close</mat-icon>{{ t("cancel") }}</button>
61+
<button mat-button class="back" (click)="cancelClicked()"><mat-icon>close</mat-icon>{{ t("cancel") }}</button>
6262
<div class="save-container">
6363
<div class="progress" [class.saving]="saving">
6464
<mat-spinner diameter="24"></mat-spinner>

src/SIL.XForge.Scripture/ClientApp/src/app/translate/draft-generation/draft-usfm-format/draft-usfm-format.component.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,11 @@ export class DraftUsfmFormatComponent extends DataLoadingComponent implements Af
197197
this.reloadText();
198198
}
199199

200+
async cancelClicked(): Promise<void> {
201+
if (!(await this.confirmLeave())) return;
202+
this.close();
203+
}
204+
200205
close(): void {
201206
this.location.back();
202207
}

0 commit comments

Comments
 (0)