From d3321ebe1cb4416d3034940197e58cb7ba6098f1 Mon Sep 17 00:00:00 2001 From: Oscar Hinton Date: Fri, 11 Nov 2022 15:43:19 +0100 Subject: [PATCH] [SM-340] Fix share modal not closing on cancel (#4041) --- apps/desktop/src/app/vault/share.component.html | 2 +- apps/desktop/src/app/vault/share.component.ts | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/apps/desktop/src/app/vault/share.component.html b/apps/desktop/src/app/vault/share.component.html index f460703d5d3..9232d08df3b 100644 --- a/apps/desktop/src/app/vault/share.component.html +++ b/apps/desktop/src/app/vault/share.component.html @@ -72,7 +72,7 @@ aria-hidden="true" > - + diff --git a/apps/desktop/src/app/vault/share.component.ts b/apps/desktop/src/app/vault/share.component.ts index 57906671b21..3b0eb9ad490 100644 --- a/apps/desktop/src/app/vault/share.component.ts +++ b/apps/desktop/src/app/vault/share.component.ts @@ -1,5 +1,6 @@ import { Component } from "@angular/core"; +import { ModalRef } from "@bitwarden/angular/components/modal/modal.ref"; import { ShareComponent as BaseShareComponent } from "@bitwarden/angular/components/share.component"; import { CipherService } from "@bitwarden/common/abstractions/cipher.service"; import { CollectionService } from "@bitwarden/common/abstractions/collection.service"; @@ -19,7 +20,8 @@ export class ShareComponent extends BaseShareComponent { collectionService: CollectionService, platformUtilsService: PlatformUtilsService, logService: LogService, - organizationService: OrganizationService + organizationService: OrganizationService, + private modalRef: ModalRef ) { super( collectionService, @@ -30,4 +32,8 @@ export class ShareComponent extends BaseShareComponent { organizationService ); } + + protected close() { + this.modalRef.close(); + } }