Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/browser/components/tabbrowser/content/tabbrowser-js.patch
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,17 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..2ab8633d0378e5a25cf75c50b29d4689
);
}

+ if (
+ userContextId === undefined &&
+ aURI?.spec?.startsWith("view-source:") &&
+ this.selectedTab
+ ) {
+ const selectedUserContextId = this.selectedTab.getAttribute("usercontextid");
+ if (selectedUserContextId) {
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The truthiness check if (selectedUserContextId) will skip inheritance when the selected tab has usercontextid="0" (No Container), because the string "0" is falsy in JavaScript. This means view-source will not inherit "No Container" explicitly set on a tab, which may or may not be intentional. Consider using if (selectedUserContextId !== null) to handle the "0" case explicitly, or document why "No Container" should not be inherited.

Suggested change
+ if (selectedUserContextId) {
+ if (selectedUserContextId !== null) {

Copilot uses AI. Check for mistakes.
+ userContextId = parseInt(selectedUserContextId, 10);
+ }
+ }
+
+ let hasZenDefaultUserContextId = false;
+ let zenForcedWorkspaceId = undefined;
+ if (typeof gZenWorkspaces !== "undefined" && !_forZenEmptyTab) {
Expand Down