1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 00:33:44 +00:00

browser api for closing popup

This commit is contained in:
Kyle Spearrin
2018-01-12 16:42:47 -05:00
parent c15a2f5747
commit 4fc21767be
4 changed files with 11 additions and 3 deletions

View File

@@ -27,7 +27,7 @@ export class ActionButtonsController implements ng.IController {
self.$analytics.eventTrack('Launched Website From Listing');
BrowserApi.createNewTab(self.cipher.login.uri);
if (PopupUtilsService.inPopup(self.$window)) {
self.$window.close();
BrowserApi.closePopup(self.$window);
}
}
});

View File

@@ -42,7 +42,7 @@ export class PopOutController implements ng.IController {
});
if (PopupUtilsService.inPopup(this.$window)) {
this.$window.close();
BrowserApi.closePopup(this.$window);
}
} else if ((typeof chrome !== 'undefined') && chrome.tabs && chrome.tabs.create) {
href = href.replace('uilocation=popup', 'uilocation=tab')

View File

@@ -90,7 +90,7 @@ export class CurrentController {
this.utilsService.copyToClipboard(totpCode, document);
}
if (PopupUtilsService.inPopup(this.$window)) {
this.$window.close();
BrowserApi.closePopup(this.$window);
}
}).catch(() => {
this.$analytics.eventTrack('Autofilled Error');