From a4416cc4d920cb4b0eee592b06e0a4045030d2c8 Mon Sep 17 00:00:00 2001 From: Harry Twyford Date: Mon, 24 Feb 2020 23:59:43 +0000 Subject: [PATCH] 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 --- browser/components/urlbar/UrlbarInput.jsm | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/browser/components/urlbar/UrlbarInput.jsm b/browser/components/urlbar/UrlbarInput.jsm index 8496ac486bf3..785a946daa0d 100644 --- a/browser/components/urlbar/UrlbarInput.jsm +++ b/browser/components/urlbar/UrlbarInput.jsm @@ -1775,7 +1775,6 @@ class UrlbarInput { event.target == this._inputContainer || event.target.id == SEARCH_BUTTON_ID ) { - this.startLayoutExtend(); this._maybeSelectAll(); } } @@ -1796,14 +1795,12 @@ class UrlbarInput { this.setAttribute("focused", "true"); } - // We handle mouse-based expansion events separately in _on_click. + this.startLayoutExtend(); + if (this.focusedViaMousedown) { this.view.autoOpen({ event }); - } else { - this.startLayoutExtend(); - if (this.inputField.hasAttribute("refocused-by-panel")) { - this._maybeSelectAll(true); - } + } else if (this.inputField.hasAttribute("refocused-by-panel")) { + this._maybeSelectAll(true); } this._updateUrlTooltip();