Bug 1203134, autocomplete popup not positioned properly when it appears upwards, e10s only, r=felipe
authorNeil Deakin <neil@mozilla.com>
Mon, 14 Sep 2015 15:18:42 -0400
changeset 296733 d7b18f4aa01089dab89973f19ebb2e2bfc6a56a9
parent 296732 cd96a343381a64b663d16684a9c0a1aefdceca18
child 296734 aa3457f5ddc2adb70c72879c0465e5eee92f6be0
push id962
push userjlund@mozilla.com
push dateFri, 04 Dec 2015 23:28:54 +0000
treeherdermozilla-release@23a2d286e80f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfelipe
bugs1203134
milestone43.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 1203134, autocomplete popup not positioned properly when it appears upwards, e10s only, r=felipe
toolkit/components/satchel/AutoCompleteE10S.jsm
--- a/toolkit/components/satchel/AutoCompleteE10S.jsm
+++ b/toolkit/components/satchel/AutoCompleteE10S.jsm
@@ -93,17 +93,19 @@ this.AutoCompleteE10S = {
     this.browser = browserWindow.gBrowser.selectedBrowser;
     this.popup = this.browser.autoCompletePopup;
     this.popup.hidden = false;
     // don't allow the popup to become overly narrow
     this.popup.setAttribute("width", Math.max(100, rect.width));
     this.popup.style.direction = direction;
 
     this.x = rect.left;
-    this.y = rect.top + rect.height;
+    this.y = rect.top;
+    this.width = rect.width;
+    this.height = rect.height;
   },
 
   _showPopup: function(results) {
     AutoCompleteE10SView.clearResults();
 
     let resultsArray = [];
     let count = results.matchCount;
     for (let i = 0; i < count; i++) {
@@ -120,17 +122,17 @@ this.AutoCompleteE10S = {
     this.popup.selectedIndex = -1;
     this.popup.invalidate();
 
     if (count > 0) {
       // Reset fields that were set from the last time the search popup was open
       this.popup.mInput = null;
       this.popup.showCommentColumn = false;
       this.popup.showImageColumn = false;
-      this.popup.openPopupAtScreen(this.x, this.y, true);
+      this.popup.openPopupAtScreenRect("after_start", this.x, this.y, this.width, this.height, false, false);
     } else {
       this.popup.closePopup();
     }
 
     this._resultCache = results;
     return resultsArray;
   },