Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Pinned side panel is not re-opened when returning to a tab where it was open

284 views
Skip to first unread message

lettuceleaf

unread,
May 2, 2024, 5:24:32 AM5/2/24
to Chromium Extensions
To my shame I only discovered that extensions can utilize side panels two weeks ago when I joined this group, great stuff.
But I’m running into a problem: for some reason the panel does not reappear when I return to a webpage where it was enabled and visible which makes it rather useless. It seems to not match the behavior explained in the docs: "When a user temporarily switches to a tab where the side panel is not enabled, the side panel will be hidden. It will automatically show again when the user switches to a tab where it was previously open."
Tested in Chrome 124 and 126. Turning #side-panel-pinning flag on or off doesn’t seem to do anything. If needed, a visual illustration:

Is it a temporary issue, because the side panel is going through a redesign?

lettuceleaf

unread,
May 5, 2024, 7:41:53 AM5/5/24
to Chromium Extensions, lettuceleaf
Sorry, false alarm, I thought that calling "setOptions" without a path, it would take "default_path" from the manifest, but that’s not how it works. Another thing that confused me, after extension refresh, the side panel stays open on each tab even when it shouldn't, but that’s because "onUpdated" in a service worker didn't have a chance to be called, but opening a new window with all previous tabs triggers the listeners to correctly set options for each tab.

Oliver Dunk

unread,
Jun 13, 2024, 7:16:46 AM6/13/24
to lettuceleaf, Chromium Extensions
Hi,

Thanks for the feedback and glad you figured out some of this already :)

Could you elaborate on what you mean in your second post? It looks like today we do close the side panel automatically when an extension is updated.

Thanks,
Oliver Dunk | DevRel, Chrome Extensions | https://developer.chrome.com/ | London, GB


--
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/be13946f-b683-4a05-9a27-08e0079b9afen%40chromium.org.

lettuceleaf

unread,
Jun 13, 2024, 10:28:19 AM6/13/24
to Chromium Extensions, Oliver Dunk, Chromium Extensions, lettuceleaf
Hi, gladly.
I was talking about on install and on enable events and hadn't even thought about an extension update, fingers crossed it's working as expected. `onUpdated` here is referring to `chrome.tabs.onUpdated`. If it’s a site-specific side panel, but allowed to be opened in any tab when a user clicks an an "Open side panel" button (with code similar to https://github.com/GoogleChrome/chrome-extensions-samples/blob/main/functional-samples/cookbook.sidepanel-open/script.js), it will stay open in all tabs when the extension is freshly installed or re-enabled. In a different thread you already explained how to handle both of those events (thanks again), so all tabs can be enabled/disabled depending on the url.
Reply all
Reply to author
Forward
0 new messages