1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 08:13:42 +00:00

2fa login fixes for duo on safari

This commit is contained in:
Kyle Spearrin
2018-01-18 16:17:58 -05:00
parent 35385b8c98
commit 43f563d187
9 changed files with 77 additions and 14 deletions

View File

@@ -282,6 +282,21 @@ export default class MainBackground {
this.runtimeBackground.processMessage(message, { tab: null }, () => { /* No response needed. */ });
}
async openPopup() {
// Chrome APIs cannot open popup
if (!this.isSafari || !safari.extension.toolbarItems || !safari.extension.toolbarItems.length) {
return;
}
const activeToolBars = safari.extension.toolbarItems.filter((tb: any) => {
return tb.browserWindow === safari.application.activeBrowserWindow;
});
if (activeToolBars && activeToolBars.length) {
activeToolBars[0].showPopover();
}
}
private async buildContextMenu() {
if (this.isSafari || !chrome.contextMenus || this.buildingContextMenu) {
return;