Browse Source

fix: active tab block not working (#1345)

Ahmad Kholid 1 year ago
parent
commit
e8db1722cd
1 changed files with 0 additions and 8 deletions
  1. 0 8
      src/workflowEngine/blocksHandler/handlerActiveTab.js

+ 0 - 8
src/workflowEngine/blocksHandler/handlerActiveTab.js

@@ -19,7 +19,6 @@ async function activeTab(block) {
       active: true,
       url: '*://*/*',
     };
-    let dashboardWindowId = null;
 
     if (BROWSER_TYPE === 'firefox') {
       tabsQuery.currentWindow = true;
@@ -35,9 +34,7 @@ async function activeTab(block) {
         if (isDashboard) {
           await browser.windows.update(browserWindow.id, {
             focused: false,
-            state: 'minimized',
           });
-          dashboardWindowId = browserWindow.id;
         } else if (browserWindow.focused) {
           windowId = browserWindow.id;
         }
@@ -52,7 +49,6 @@ async function activeTab(block) {
       await Promise.all(
         dashboardTabs.map((item) =>
           browser.windows.update(item.windowId, {
-            state: 'minimized',
             focused: false,
           })
         )
@@ -61,10 +57,6 @@ async function activeTab(block) {
       tabsQuery.currentWindow = true;
     }
 
-    if (dashboardWindowId) {
-      await browser.windows.update(dashboardWindowId, { state: 'normal' });
-    }
-
     const [tab] = await browser.tabs.query(tabsQuery);
     if (!tab) {
       throw new Error("Can't find active tab");