mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-22 11:45:59 +01:00
Add Back Safari Only Handling of Process Reload (#11115)
This commit is contained in:
parent
99ba56785d
commit
e8979decae
@ -1038,6 +1038,14 @@ export default class MainBackground {
|
||||
|
||||
const systemUtilsServiceReloadCallback = async () => {
|
||||
await this.taskSchedulerService.clearAllScheduledTasks();
|
||||
if (this.platformUtilsService.isSafari()) {
|
||||
// If we do `chrome.runtime.reload` on safari they will send an onInstalled reason of install
|
||||
// and that prompts us to show a new tab, this apparently doesn't happen on sideloaded
|
||||
// extensions and only shows itself production scenarios. See: https://bitwarden.atlassian.net/browse/PM-12298
|
||||
self.location.reload();
|
||||
return;
|
||||
}
|
||||
|
||||
BrowserApi.reloadExtension();
|
||||
};
|
||||
|
||||
|
@ -127,6 +127,12 @@ export class AppComponent implements OnInit, OnDestroy {
|
||||
this.showNativeMessagingFingerprintDialog(msg);
|
||||
} else if (msg.command === "showToast") {
|
||||
this.toastService._showToast(msg);
|
||||
} else if (msg.command === "reloadProcess") {
|
||||
if (this.platformUtilsService.isSafari()) {
|
||||
window.setTimeout(() => {
|
||||
window.location.reload();
|
||||
}, 2000);
|
||||
}
|
||||
} else if (msg.command === "reloadPopup") {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
|
Loading…
Reference in New Issue
Block a user