mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 783103 - Avoid layout flush from isElementVisible when attempting to focus the URL bar or search bar. r=enn
This commit is contained in:
parent
96ff9295e7
commit
255346b385
@ -1286,9 +1286,9 @@ var gBrowserInit = {
|
||||
|
||||
UpdateUrlbarSearchSplitterState();
|
||||
|
||||
if (isLoadingBlank && gURLBar && isElementVisible(gURLBar))
|
||||
if (isLoadingBlank && gURLBar)
|
||||
gURLBar.focus();
|
||||
else
|
||||
if (!isLoadingBlank || !gURLBar || !gURLBar.focused)
|
||||
gBrowser.selectedBrowser.focus();
|
||||
|
||||
gNavToolbox.customizeDone = BrowserToolboxCustomizeDone;
|
||||
@ -1988,8 +1988,9 @@ function focusAndSelectUrlBar() {
|
||||
if (gURLBar) {
|
||||
if (window.fullScreen)
|
||||
FullScreen.mouseoverToggle(true);
|
||||
if (isElementVisible(gURLBar)) {
|
||||
gURLBar.focus();
|
||||
|
||||
gURLBar.focus();
|
||||
if (gURLBar.focused) {
|
||||
gURLBar.select();
|
||||
return true;
|
||||
}
|
||||
@ -3350,10 +3351,10 @@ const BrowserSearch = {
|
||||
var searchBar = this.searchBar;
|
||||
if (searchBar && window.fullScreen)
|
||||
FullScreen.mouseoverToggle(true);
|
||||
|
||||
if (isElementVisible(searchBar)) {
|
||||
searchBar.select();
|
||||
if (searchBar)
|
||||
searchBar.focus();
|
||||
if (searchBar && searchBar.textbox.focused) {
|
||||
searchBar.select();
|
||||
} else {
|
||||
openUILinkIn(Services.search.defaultEngine.searchForm, "current");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user