Enhancement: save & next / close shortcut key (#8243)

This commit is contained in:
shamoon
2024-11-12 16:21:10 -08:00
committed by GitHub
parent a283a65813
commit 3633fb382f
2 changed files with 18 additions and 0 deletions

View File

@@ -509,6 +509,16 @@ export class DocumentDetailComponent
.subscribe(() => {
if (this.openDocumentService.isDirty(this.document)) this.save()
})
this.hotKeyService
.addShortcut({
keys: 'control.shift.s',
description: $localize`Save and close / next`,
})
.pipe(takeUntil(this.unsubscribeNotifier))
.subscribe(() => {
if (this.openDocumentService.isDirty(this.document)) this.saveEditNext()
})
}
ngOnDestroy(): void {