зеркало из https://github.com/mozilla/gecko-dev.git
Bug 655584 - Close popup when switching to tab that previously had urlbar focused. r=gavin
This commit is contained in:
Родитель
6fd7f68025
Коммит
ce67658990
|
@ -963,6 +963,10 @@
|
||||||
// if the tab is a blank one.
|
// if the tab is a blank one.
|
||||||
oldBrowser._urlbarFocused = (gURLBar && gURLBar.focused);
|
oldBrowser._urlbarFocused = (gURLBar && gURLBar.focused);
|
||||||
if (newBrowser._urlbarFocused && gURLBar) {
|
if (newBrowser._urlbarFocused && gURLBar) {
|
||||||
|
|
||||||
|
// Explicitly close the popup if the URL bar retains focus
|
||||||
|
gURLBar.closePopup();
|
||||||
|
|
||||||
if (!window.fullScreen) {
|
if (!window.fullScreen) {
|
||||||
gURLBar.focus();
|
gURLBar.focus();
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -171,6 +171,7 @@ _BROWSER_FILES = \
|
||||||
browser_bug623893.js \
|
browser_bug623893.js \
|
||||||
browser_bug624734.js \
|
browser_bug624734.js \
|
||||||
browser_bug647886.js \
|
browser_bug647886.js \
|
||||||
|
browser_bug655584.js \
|
||||||
browser_findbarClose.js \
|
browser_findbarClose.js \
|
||||||
browser_contextSearchTabPosition.js \
|
browser_contextSearchTabPosition.js \
|
||||||
browser_ctrlTab.js \
|
browser_ctrlTab.js \
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
/* Any copyright is dedicated to the Public Domain.
|
||||||
|
* http://creativecommons.org/publicdomain/zero/1.0/
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Bug 655584 - awesomebar suggestions don't update after tab is closed
|
||||||
|
|
||||||
|
function test() {
|
||||||
|
var tab1 = gBrowser.addTab();
|
||||||
|
var tab2 = gBrowser.addTab();
|
||||||
|
|
||||||
|
// When urlbar in a new tab is focused, and a tab switch occurs,
|
||||||
|
// the urlbar popup should be closed
|
||||||
|
gBrowser.selectedTab = tab2;
|
||||||
|
gURLBar.focus(); // focus the urlbar in the tab we will switch to
|
||||||
|
gBrowser.selectedTab = tab1;
|
||||||
|
gURLBar.openPopup();
|
||||||
|
gBrowser.selectedTab = tab2;
|
||||||
|
ok(!gURLBar.popupOpen, "urlbar focused in tab to switch to, close popup");
|
||||||
|
|
||||||
|
// cleanup
|
||||||
|
gBrowser.removeCurrentTab();
|
||||||
|
gBrowser.removeCurrentTab();
|
||||||
|
}
|
Загрузка…
Ссылка в новой задаче