diff --git a/patches/devtools_frontend/.patches b/patches/devtools_frontend/.patches index b6487851e3..e0f215cf02 100644 --- a/patches/devtools_frontend/.patches +++ b/patches/devtools_frontend/.patches @@ -1,3 +1,4 @@ chore_expose_ui_to_allow_electron_to_set_dock_side.patch fix_prefer_browser_runtime_over_node_in_hostruntime_detection.patch feat_allow_enabling_extension_panels_on_custom_protocols.patch +fix_context_selector_not_showing_execution_contexts.patch diff --git a/patches/devtools_frontend/fix_context_selector_not_showing_execution_contexts.patch b/patches/devtools_frontend/fix_context_selector_not_showing_execution_contexts.patch new file mode 100644 index 0000000000..5c7eddd56e --- /dev/null +++ b/patches/devtools_frontend/fix_context_selector_not_showing_execution_contexts.patch @@ -0,0 +1,25 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Fedor Indutny +Date: Tue, 14 Apr 2026 19:33:23 -0700 +Subject: Fix context selector not showing execution contexts + +When execution context's origin is `file://` - the `url.domain()` is an +empty string and the item's subtitle becomes falsy. Since we predicated +rendering of an item on presence of both title and subtitle - the items +were not rendered while still taking space in the dropdown. + +Pending CL: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/7761316 + +diff --git a/front_end/panels/console/ConsoleContextSelector.ts b/front_end/panels/console/ConsoleContextSelector.ts +index f933dbd6dbdfadd2ea8b78e473d9506350825037..09f590fff0263875b1727bdf7e8dd57a17603ee3 100644 +--- a/front_end/panels/console/ConsoleContextSelector.ts ++++ b/front_end/panels/console/ConsoleContextSelector.ts +@@ -303,7 +303,7 @@ interface ViewInput { + type View = (input: ViewInput, output: undefined, target: HTMLElement) => void; + + const DEFAULT_VIEW: View = (input, _output, target): void => { +- if (!input.title || !input.subtitle) { ++ if (!input.title && !input.subtitle) { + render(nothing, target); + return; + }