Bug 1516130 - Accel+K shouldn't focus and modify the read-only address bar in popups. r=mak

Differential Revision: https://phabricator.services.mozilla.com/D15260

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Dão Gottwald 2018-12-24 14:50:38 +00:00
Родитель b0bc11783b
Коммит b77881e30c
1 изменённых файлов: 6 добавлений и 5 удалений

Просмотреть файл

@ -3982,13 +3982,14 @@ const BrowserSearch = {
},
/**
* Gives focus to the search bar, if it is present on the toolbar, or loads
* the default engine's search form otherwise. For Mac, opens a new window
* or focuses an existing window, if necessary.
* Focuses the search bar if present on the toolbar, or the address bar,
* putting it in search mode. Will do so in an existing non-popup browser
* window or open a new one if necessary.
*/
webSearch: function BrowserSearch_webSearch() {
if (window.location.href != AppConstants.BROWSER_CHROME_URL) {
var win = getTopWin();
if (window.location.href != AppConstants.BROWSER_CHROME_URL ||
gURLBar.readOnly) {
let win = getTopWin(true);
if (win) {
// If there's an open browser window, it should handle this command
win.focus();