Bug 566304 - Cannot pan automcomplete list to left after selecting Next and Previous buttons [r=mfinkle]
authorVivien Nicolas <21@vingtetun.org>
Mon, 17 May 2010 16:13:25 -0400
changeset 66226 4e1931eab37fbde65961664a4b054f2c73ab5ccf
parent 66225 82b925cf346cc5c2a97d6580a437f9f19e22a2ed
child 66227 4e3c7f72838f2817384ebb71349e65551d65fed5
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)
reviewersmfinkle
bugs566304
Bug 566304 - Cannot pan automcomplete list to left after selecting Next and Previous buttons [r=mfinkle]
mobile/chrome/content/browser-ui.js
mobile/chrome/content/browser.xul
--- a/mobile/chrome/content/browser-ui.js
+++ b/mobile/chrome/content/browser-ui.js
@@ -1440,17 +1440,17 @@ var FormHelper = {
   _update: function(aPreviousElement, aNewElement) {
     this._updateSelect(aPreviousElement, aNewElement);
 
     // Setup autofill UI
     if (aNewElement instanceof HTMLInputElement && aNewElement.type == "text") {
       let suggestions = this._getSuggestions();
       this._setSuggestions(suggestions);
     } else {
-      this._autofillContainer.hidden = true;
+      this._autofillContainer.collapsed = true;
     }
 
     let height = Math.floor(this._container.getBoundingClientRect().height);
     this._container.top = window.innerHeight - height;
 
     document.getElementById("form-helper-previous").disabled = this._getPrevious() ? false : true;
     document.getElementById("form-helper-next").disabled = this._getNext() ? false : true;
   },
@@ -1595,17 +1595,17 @@ var FormHelper = {
     let fragment = document.createDocumentFragment();
     for (let i = 0; i < aSuggestions.length; i++) {
       let value = aSuggestions[i];
       let button = document.createElement("label");
       button.setAttribute("value", value);
       fragment.appendChild(button);
     }
     autofill.appendChild(fragment);
-    autofill.hidden = !aSuggestions.length;
+    autofill.collapsed = !aSuggestions.length;
   },
 
   doAutoFill: function formHelperDoAutoFill(aElement) {
     if (!this._currentElement)
      return;
 
     // Suggestions are only in <label>s. Ignore the rest.
     if (aElement instanceof Ci.nsIDOMXULLabelElement)
--- a/mobile/chrome/content/browser.xul
+++ b/mobile/chrome/content/browser.xul
@@ -283,17 +283,17 @@
           <toolbarspring/>
           <toolbarbutton id="tool-panel-open" class="page-button button-image" command="cmd_panel"/>
         </vbox>
       </vbox>
     </scrollbox>
 
     <!-- popup for form helper -->
     <vbox id="form-helper-container" class="window-width" hidden="true" top="0" pack="end">
-      <arrowscrollbox id="form-helper-autofill" hidden="true" align="center" flex="1" orient="horizontal"
+      <arrowscrollbox id="form-helper-autofill" collapsed="true" align="center" flex="1" orient="horizontal"
                       onclick="FormHelper.doAutoFill(event.target);"/>
       <hbox id="form-buttons" class="panel-dark" pack="center">
         <button id="form-helper-previous" class="button-dark" label="&formHelper.previous;" command="cmd_formPrevious"/>
         <button id="form-helper-next" class="button-dark" label="&formHelper.next;" command="cmd_formNext"/>
         <spacer flex="1"/>
         <toolbarbutton id="form-helper-close" class="close-button" command="cmd_formClose"/>
       </hbox>
     </vbox>