From a77996df600c92ae72976f9f0398a463f7f069f8 Mon Sep 17 00:00:00 2001 From: tophf Date: Sat, 4 Jun 2022 18:02:41 +0300 Subject: [PATCH] window type may be 'app' --- edit/base.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/edit/base.js b/edit/base.js index d4443461..2ee946b9 100644 --- a/edit/base.js +++ b/edit/base.js @@ -236,7 +236,8 @@ function EditorHeader() { async function initWindowedMode() { chrome.tabs.onAttached.addListener(onTabAttached); - const isSimple = (await browser.windows.getCurrent()).type === 'popup'; + // Chrome 96+ bug: the type is 'app' for a window that was restored via Ctrl-Shift-T + const isSimple = ['app', 'popup'].includes((await browser.windows.getCurrent()).type); if (isSimple) require(['/edit/embedded-popup']); editor.isWindowed = isSimple || ( history.length === 1 &&