Bug 520285: urlbar pans to the right after opening/closing larry info [r=mark.finkle]
authorVivien Nicolas <21@vingtetun.org>
Mon, 12 Oct 2009 14:35:01 -0400
changeset 65652 201429029e861828f16c8cc830325bbe47b9ee00
parent 65651 b582636eddc005cbb7c365f04c435cb039a9a5d4
child 65653 848bc8880bad94ecb72ba6adb5bcc4eb7955dbad
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmark
bugs520285
Bug 520285: urlbar pans to the right after opening/closing larry info [r=mark.finkle]
mobile/chrome/content/InputHandler.js
mobile/chrome/content/browser-ui.js
mobile/chrome/content/browser.js
--- a/mobile/chrome/content/InputHandler.js
+++ b/mobile/chrome/content/InputHandler.js
@@ -485,17 +485,17 @@ MouseModule.prototype = {
 
     if (targetScrollInterface) {
       this._doDragStart(evInfo.event);
     }
 
     if (this._targetIsContent(evInfo.event)) {
       this._recordEvent(evInfo);
     }
-    else if(targetScrollInterface) {
+    else if (targetScrollInterface) {
       // look if we can pan in only one direction
       let cX = {}, cY = {};
       targetScrollInterface.getScrolledSize(cX, cY);
       let rect = targetScrollbox.getBoundingClientRect();
     
       this._dragData.alreadyLocked = ((cX.value > rect.width) != (cY.value > rect.height));
     }
   },
--- a/mobile/chrome/content/browser-ui.js
+++ b/mobile/chrome/content/browser-ui.js
@@ -289,17 +289,16 @@ var BrowserUI = {
     let targetNode = aEvent.target;
     while (targetNode && element.indexOf(targetNode) == -1)
       targetNode = targetNode.parentNode;
 
     if (targetNode == null) {
       let panel = this._popup.panel;
       if (panel.hide)
         panel.hide();
-      this.popPopup();
     }
   },
 
   switchPane : function(id) {
     document.getElementById("panel-items").selectedPanel = document.getElementById(id);
   },
 
   get toolbarH() {
@@ -819,16 +818,17 @@ var NewTabPopup = {
   hide: function() {
     if (this._timeout) {
       clearTimeout(this._timeout);
       this._timeout = 0;
     }
 
     this._tabs = [];
     this.box.hidden = true;
+    BrowserUI.popPopup();
   },
   
   show: function(aTab) {
     this._tabs.push(aTab);
     this._updateLabel();
 
     this.box.top = aTab.getBoundingClientRect().top + (aTab.getBoundingClientRect().height / 3);
     this.box.hidden = false;
@@ -858,16 +858,17 @@ var BookmarkPopup = {
   _bookmarkPopupTimeout: -1,
 
   hide : function () {
     if (this._bookmarkPopupTimeout != -1) {
       clearTimeout(this._bookmarkPopupTimeout);
       this._bookmarkPopupTimeout = -1;
     }
     this.box.hidden = true;
+    BrowserUI.popPopup();
   },
   
   show : function (aAutoClose) {
     this.box.hidden = false;
 
     if (aAutoClose) {
       this._bookmarkPopupTimeout = setTimeout(function (self) {
         self._bookmarkPopupTimeout = -1;
--- a/mobile/chrome/content/browser.js
+++ b/mobile/chrome/content/browser.js
@@ -1805,16 +1805,17 @@ IdentityHandler.prototype = {
     BrowserUI.pushPopup(this, [this._identityPopup, this._identityBox]);
     BrowserUI.lockToolbar();
   },
 
   hide: function ih_hide() {
     this._identityPopup.hidden = true;
     this._identityBox.removeAttribute("open");
     
+    BrowserUI.popPopup();
     BrowserUI.unlockToolbar();
   },
 
   /**
    * Click handler for the identity-box element in primary chrome.
    */
   handleIdentityButtonEvent: function(event) {
     event.stopPropagation();