mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 892384 - When switching to a tab with an open find bar, focus it. r=dao
--HG-- extra : rebase_source : b55d5a749c8349552fdcebd531da893bebe18007
This commit is contained in:
parent
6b681d0ed7
commit
d830d57573
@ -1105,11 +1105,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
// If the find bar is focused, keep it focused.
|
||||
if (gFindBarInitialized &&
|
||||
!gFindBar.hidden &&
|
||||
gFindBar.getElement("findbar-textbox").getAttribute("focused") == "true")
|
||||
// If the find bar is open, focus it.
|
||||
if (gFindBarInitialized && !gFindBar.hidden) {
|
||||
gFindBar._findField.focus();
|
||||
break;
|
||||
}
|
||||
|
||||
// Otherwise, focus the content area.
|
||||
let fm = Cc["@mozilla.org/focus-manager;1"].getService(Ci.nsIFocusManager);
|
||||
|
@ -69,6 +69,9 @@ function continueTests() {
|
||||
ok(gFindBar.hidden, "First tab doesn't show find bar!");
|
||||
gBrowser.selectedTab = tabs[1];
|
||||
ok(!gFindBar.hidden, "Second tab shows find bar!");
|
||||
// Test for bug 892384
|
||||
is(gFindBar._findField.getAttribute("focused"), "true",
|
||||
"Open findbar refocused on tab change!");
|
||||
gBrowser.selectedTab = tabs[0];
|
||||
ok(gFindBar.hidden, "First tab doesn't show find bar!");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user