Bug 1550036 - UrlbarView should ignore vertical overflow events when applying the fade-out effect. r=mak
authorDão Gottwald <dao@mozilla.com>
Wed, 08 May 2019 15:49:33 +0000
changeset 473090 37883d51ffd1e3809cfda2b9efd11df72878f20d
parent 473089 9f6d0100dec9ef0b8dc7ff7a4dc9f81364812ebc
child 473091 f6b5ab8f054ad48b1826c5af211a1a6c0bb214bb
push id85020
push userdgottwald@mozilla.com
push dateWed, 08 May 2019 15:50:57 +0000
treeherderautoland@37883d51ffd1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmak
bugs1550036
milestone68.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 1550036 - UrlbarView should ignore vertical overflow events when applying the fade-out effect. r=mak Differential Revision: https://phabricator.services.mozilla.com/D30381
browser/components/urlbar/UrlbarView.jsm
--- a/browser/components/urlbar/UrlbarView.jsm
+++ b/browser/components/urlbar/UrlbarView.jsm
@@ -720,25 +720,27 @@ class UrlbarView {
     let row = event.target;
     while (!row.classList.contains("urlbarView-row")) {
       row = row.parentNode;
     }
     this.input.pickResult(event, parseInt(row.getAttribute("resultIndex")));
   }
 
   _on_overflow(event) {
-    if (event.target.classList.contains("urlbarView-url") ||
-        event.target.classList.contains("urlbarView-title")) {
+    if (event.detail == 1 &&
+        (event.target.classList.contains("urlbarView-url") ||
+         event.target.classList.contains("urlbarView-title"))) {
       event.target.toggleAttribute("overflow", true);
     }
   }
 
   _on_underflow(event) {
-    if (event.target.classList.contains("urlbarView-url") ||
-        event.target.classList.contains("urlbarView-title")) {
+    if (event.detail == 1 &&
+        (event.target.classList.contains("urlbarView-url") ||
+         event.target.classList.contains("urlbarView-title"))) {
       event.target.toggleAttribute("overflow", false);
     }
   }
 
   _on_popupshowing() {
     this.window.addEventListener("resize", this);
   }