commit 268d417e243a29120a39b6ed680a8ec65f3a7d71
parent 108746012f3a80eb57110fe8a5414d48d43e441c
Author: Jonathan Sudiaman <jsudiaman@mozilla.com>
Date: Tue, 6 Jan 2026 18:33:28 +0000
Bug 2007172 - Place inactive view footer on top of the Find in page bar r=tabbrowser-reviewers,desktop-theme-reviewers,nsharpley
Differential Revision: https://phabricator.services.mozilla.com/D277548
Diffstat:
6 files changed, 10 insertions(+), 35 deletions(-)
diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js
@@ -3356,7 +3356,7 @@
if (panelEl) {
const footer = document.createXULElement("split-view-footer");
footer.setTab(tab);
- panelEl.appendChild(footer);
+ panelEl.querySelector(".browserStack").appendChild(footer);
}
}
diff --git a/browser/components/tabbrowser/test/browser/tabs/browser_tab_splitview.js b/browser/components/tabbrowser/test/browser/tabs/browser_tab_splitview.js
@@ -322,7 +322,7 @@ add_task(async function test_click_findbar_to_select_panel() {
await promiseFindbarOpen;
info("Select the second panel by clicking the find bar.");
- EventUtils.synthesizeMouseAtCenter(findbar, {});
+ EventUtils.synthesizeMouseAtCenter(findbar.getElement("findbar-textbox"), {});
await BrowserTestUtils.waitForMutationCondition(
panel2,
{ attributeFilter: ["class"] },
diff --git a/browser/components/tabbrowser/test/browser/tabs/browser_tab_splitview_footer.js b/browser/components/tabbrowser/test/browser/tabs/browser_tab_splitview_footer.js
@@ -220,33 +220,3 @@ add_task(async function test_menu_close_tabs() {
await activateCommand(inactivePanel, "splitViewCmd_closeTabs");
await promiseTabsClosed;
});
-
-add_task(async function test_findbar_displayed_over_footer() {
- const { tabs, splitView } = await setupSplitView();
- const [tab1, tab2] = tabs;
- await SimpleTest.promiseFocus(tab1.linkedBrowser);
-
- info("Activate Find in Page within the second panel.");
- const findbar = await gBrowser.getFindBar(tab2);
- const promiseFindbarOpen = BrowserTestUtils.waitForEvent(
- findbar,
- "findbaropen"
- );
- findbar.open();
- await promiseFindbarOpen;
-
- const panel = document.getElementById(tab2.linkedPanel);
- const footer = panel.querySelector("split-view-footer");
- const footerRect = footer.getBoundingClientRect();
- Assert.ok(
- !footer.contains(
- document.elementFromPoint(
- footerRect.left + footerRect.width / 2,
- footerRect.top + footerRect.height / 2
- )
- ),
- "Findbar is displayed over split view footer."
- );
-
- splitView.close();
-});
diff --git a/browser/themes/shared/browser-shared.css b/browser/themes/shared/browser-shared.css
@@ -623,7 +623,6 @@ menupopup::part(drop-indicator) {
color: var(--toolbar-color);
color-scheme: var(--toolbar-color-scheme);
border-top-color: var(--chrome-content-separator-color);
- z-index: var(--browser-area-z-index-sidebar);
:root[lwtheme] & {
background-color: var(--lwt-accent-color);
diff --git a/browser/themes/shared/tabbrowser/content-area.css b/browser/themes/shared/tabbrowser/content-area.css
@@ -227,8 +227,8 @@
}
/* Display split view footer within inactive panels. */
- .split-view-panel:not(.deck-selected) > split-view-footer {
- display: inherit;
+ .split-view-panel:not(.deck-selected) > .browserContainer > .browserStack > split-view-footer {
+ display: flex;
&[hidden] {
display: none;
diff --git a/toolkit/content/widgets/tabbox.js b/toolkit/content/widgets/tabbox.js
@@ -286,8 +286,13 @@
e.currentTarget.tagName === "browser"
? e.currentTarget
: e.currentTarget.querySelector("browser");
+ let elToFocus = null;
switch (e.type) {
case "click":
+ if (e.target.tagName !== "browser") {
+ elToFocus = e.target;
+ }
+ // falls through
case "focus": {
const tab = gBrowser.getTabForBrowser(browser);
const tabstrip = this.tabbox.tabs;
@@ -302,6 +307,7 @@
gBrowser.appendStatusPanel();
break;
}
+ elToFocus?.focus();
}
get tabbox() {