Bug 676321 - Sidebar briefly shows up on orientation change while using form autocomplete (r=mbrubeck)
authorLucas Rocha <lucasr@mozilla.com>
Fri, 19 Aug 2011 15:42:39 +0200
changeset 76045 aa378dbf52e72b41e6c2e172ee966d715170a5a9
parent 76044 38f76966da562e1b1040c8023370415e1ac2ba78
child 76046 79399ce1a1fbd1f10e22f9328d2af72b7cb0dcff
push idunknown
push userunknown
push dateunknown
reviewersmbrubeck
bugs676321
milestone9.0a1
Bug 676321 - Sidebar briefly shows up on orientation change while using form autocomplete (r=mbrubeck)
mobile/chrome/content/ContentPopupHelper.js
--- a/mobile/chrome/content/ContentPopupHelper.js
+++ b/mobile/chrome/content/ContentPopupHelper.js
@@ -216,16 +216,22 @@ var ContentPopupHelper = {
 
       case "PanFinished":
       case "AnimatedZoomEnd":
         this.anchorTo();
         break;
 
       case "MozBeforeResize":
         popup.left = 0;
+        popup.style.visibility = "hidden";
+
+        // When screen orientation changes, we have to ensure that
+        // the popup width doesn't overflow the content's visible
+        // area.
+        popup.firstChild.style.maxWidth = "0px";
         break;
 
       case "resize":
         window.setTimeout(function(self) {
           self.anchorTo();
         }, 0, this);
         break;
     }