Menu

#1688 Fix tab-specific side panel open order

closed
nobody
None
2026-06-04
2026-05-25
Anonymous
No

Originally created by: KirtiRamchandani

Problem

The side panel cookbook sample can open the global side panel when a user tries the tab-specific path, matching the report in [#1179].

Root cause

The sample called chrome.sidePanel.open({ tabId }) before assigning the tab-specific sidepanel-tab.html path. Because the manifest has a global default_path, Chrome can open the global panel before the tab-specific options are applied.

Solution

Set the tab-specific side panel options first, then call chrome.sidePanel.open({ tabId }), in both the extension page flow and the content-script message flow.

Tests run

  • npx eslint --no-warn-ignored functional-samples/cookbook.sidepanel-open/script.js functional-samples/cookbook.sidepanel-open/service-worker.js --quiet
  • npx prettier --check functional-samples/cookbook.sidepanel-open/script.js functional-samples/cookbook.sidepanel-open/service-worker.js
  • git diff --check HEAD~1..HEAD
  • Node smoke check that setOptions precedes open in both tab-specific entry points

Fixes [#1179]

Related

Tickets: #1179

Discussion

  • Anonymous

    Anonymous - 2026-06-04

    Originally posted by: KirtiRamchandani

    Closing this in favor of [#1695]. This PR linked the wrong issue and only reordered the calls; [#1695] keeps the user gesture path focused on chrome.sidePanel.open() and tracks [#1477] directly.

     

    Related

    Tickets: #1477
    Tickets: #1695

  • Anonymous

    Anonymous - 2026-06-04

    Ticket changed by: KirtiRamchandani

    • status: open --> closed
     

Log in to post a comment.