Bug 1379431 - Keep URL bar open on arrows and click on anchor. r?mconley draft
authorHarry Twyford <htwyford@mozilla.com>
Tue, 15 May 2018 15:42:42 -0400
changeset 795474 9166196d04f4ae36efa59756206a472227e735e8
parent 795256 cf3ee14023483cbbb57129479537c713e22c1980
child 798344 19670e7b642ac50c392b6ab418ee48896c186875
push id109982
push userbmo:htwyford@mozilla.com
push dateTue, 15 May 2018 20:20:43 +0000
reviewersmconley
bugs1379431
milestone62.0a1
Bug 1379431 - Keep URL bar open on arrows and click on anchor. r?mconley MozReview-Commit-ID: LtY1oOgc5d4
browser/base/content/urlbarBindings.xml
--- a/browser/base/content/urlbarBindings.xml
+++ b/browser/base/content/urlbarBindings.xml
@@ -2082,16 +2082,19 @@ file, You can obtain one at http://mozil
             } else if (this.classList.contains("showSearchSuggestionsNotification")) {
               this._hideSearchSuggestionsNotification();
             }
           } catch (ex) {
             // Not critical for the urlbar functionality, just report the error.
             Cu.reportError(ex);
           }
 
+          // Don't roll up on mouse click in the anchor
+          this.setAttribute("norolluponanchor", "true");
+
           // Position the popup below the navbar.  To get the y-coordinate,
           // which is an offset from the bottom of the input, subtract the
           // bottom of the navbar from the buttom of the input.
           let yOffset = Math.round(
             this.DOMWindowUtils.getBoundsWithoutFlushing(document.getElementById("nav-bar")).bottom -
             this.DOMWindowUtils.getBoundsWithoutFlushing(aInput).bottom);
 
           this.openPopup(aElement, "after_start", 0, yOffset, false, false);