author | Dão Gottwald <dao@mozilla.com> |
Wed, 19 Sep 2012 18:55:21 +0200 | |
changeset 107509 | b267a6f936fd893cdce228a358818f3cd2423ae9 |
parent 107508 | 7276747d52605bf16fbe4a9b5aced5174f83d359 |
child 107510 | c0d1f69cc901b06c8febfc12f3363aa8de28694b |
push id | 23490 |
push user | Ms2ger@gmail.com |
push date | Thu, 20 Sep 2012 11:22:06 +0000 |
treeherder | mozilla-central@6a2d1a3556b9 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | enn |
bugs | 792390 |
milestone | 18.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -1978,21 +1978,19 @@ function loadOneOrMoreURIs(aURIString) } } function focusAndSelectUrlBar() { if (gURLBar) { if (window.fullScreen) FullScreen.mouseoverToggle(true); - gURLBar.focus(); - if (document.activeElement == gURLBar.inputField) { - gURLBar.select(); + gURLBar.select(); + if (document.activeElement == gURLBar.inputField) return true; - } } return false; } function openLocation() { if (focusAndSelectUrlBar()) return; @@ -3324,22 +3322,19 @@ const BrowserSearch = { } return; } #endif var searchBar = this.searchBar; if (searchBar && window.fullScreen) FullScreen.mouseoverToggle(true); if (searchBar) - searchBar.focus(); - if (searchBar && document.activeElement == searchBar.textbox.inputField) { searchBar.select(); - } else { + if (!searchBar || document.activeElement != searchBar.textbox.inputField) openUILinkIn(Services.search.defaultEngine.searchForm, "current"); - } }, /** * Loads a search results page, given a set of search terms. Uses the current * engine if the search bar is visible, or the default engine otherwise. * * @param searchText * The search terms to use for the search.