Bug 1617696 - Stop splitting address bar expansion between _on_focus and _on_click. r=adw

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Harry Twyford 2020-02-24 23:59:43 +00:00
Родитель 5f656bfdd1
Коммит a4416cc4d9
1 изменённых файлов: 4 добавлений и 7 удалений

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

@ -1775,7 +1775,6 @@ class UrlbarInput {
event.target == this._inputContainer || event.target == this._inputContainer ||
event.target.id == SEARCH_BUTTON_ID event.target.id == SEARCH_BUTTON_ID
) { ) {
this.startLayoutExtend();
this._maybeSelectAll(); this._maybeSelectAll();
} }
} }
@ -1796,14 +1795,12 @@ class UrlbarInput {
this.setAttribute("focused", "true"); this.setAttribute("focused", "true");
} }
// We handle mouse-based expansion events separately in _on_click. this.startLayoutExtend();
if (this.focusedViaMousedown) { if (this.focusedViaMousedown) {
this.view.autoOpen({ event }); this.view.autoOpen({ event });
} else { } else if (this.inputField.hasAttribute("refocused-by-panel")) {
this.startLayoutExtend(); this._maybeSelectAll(true);
if (this.inputField.hasAttribute("refocused-by-panel")) {
this._maybeSelectAll(true);
}
} }
this._updateUrlTooltip(); this._updateUrlTooltip();