Bug 1385374 - Disable tab scrolling when urlbar popup only displays a notification. r=mak
authorHenri Kemppainen <mozilla@guu.fi>
Mon, 04 Sep 2017 18:28:17 +0300
changeset 378787 76834322c5a8
parent 378786 8b92938b98d9
child 378788 f6ef17365243
push id94518
push userryanvm@gmail.com
push dateMon, 04 Sep 2017 20:47:14 +0000
treeherdermozilla-inbound@76834322c5a8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmak
bugs1385374
milestone57.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
Bug 1385374 - Disable tab scrolling when urlbar popup only displays a notification. r=mak
browser/base/content/urlbarBindings.xml
--- a/browser/base/content/urlbarBindings.xml
+++ b/browser/base/content/urlbarBindings.xml
@@ -1974,16 +1974,17 @@ file, You can obtain one at http://mozil
           // around that problem by disabling the listbox animation.
           this.richlistbox.flex = 0;
           this.setAttribute("dontanimate", "true");
 
           this.classList.add("showSearchSuggestionsNotification");
           // Don't show the one-off buttons if we are showing onboarding and
           // there's no result, since it would be ugly and pointless.
           this.footer.collapsed = this._matchCount == 0;
+          this.input.tabScrolling = this._matchCount != 0;
 
           // This event allows accessibility APIs to see the notification.
           if (!this.popupOpen) {
             let event = document.createEvent("Events");
             event.initEvent("AlertActive", true, true);
             this.searchSuggestionsNotification.dispatchEvent(event);
           }
           ]]>
@@ -2192,16 +2193,17 @@ file, You can obtain one at http://mozil
                 let engine = Services.search.currentEngine;
                 engine.speculativeConnect({window,
                                            originAttributes: gBrowser.contentPrincipal.originAttributes});
               }
             }
 
             // When a result is present the footer should always be visible.
             this.footer.collapsed = false;
+            this.input.tabScrolling = true;
 
             this.input.gotResultForCurrentQuery = true;
             this.input.maybeReplayDeferredKeyEvents();
           ]]>
         </body>
       </method>
 
       <method name="_onSearchBegin">