1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-06 00:13:28 +00:00

lock view open check for safari

This commit is contained in:
Kyle Spearrin
2018-01-12 21:31:46 -05:00
parent ba4a2e6572
commit 76752f81c6

View File

@@ -1,5 +1,7 @@
import * as tldjs from 'tldjs';
import { BrowserApi } from '../browser/browserApi';
import { DeviceType } from 'jslib/enums';
import { PlatformUtilsService } from 'jslib/abstractions';
@@ -119,14 +121,12 @@ export default class BrowserPlatformUtilsService implements PlatformUtilsService
}
isViewOpen(): boolean {
if (this.isSafari()) {
// TODO
if (BrowserApi.isPopupOpen()) {
return true;
}
const popupOpen = chrome.extension.getViews({ type: 'popup' }).length > 0;
if (popupOpen) {
return true;
if (this.isSafari()) {
return false;
}
const sidebarView = this.sidebarViewName();