Bug 599529 - Form helper moves input fields out of view [r=mfinkle]
authorVivien Nicolas <21@vingtetun.org>
Tue, 02 Nov 2010 16:27:54 +0100
changeset 2309 76f8e7e9cdb2c6fbfe3657a84d6385da24a556ec
parent 2308 ddce8f5d24dd1405e7b32552645b00d3c9ad9d88
child 2310 19d7242af0669ef5247e583ce3e04b6b7a125096
push id1955
push uservnicolas@mozilla.com
push dateTue, 02 Nov 2010 15:29:14 +0000
reviewersmfinkle
bugs599529
Bug 599529 - Form helper moves input fields out of view [r=mfinkle]
chrome/content/browser-ui.js
--- a/chrome/content/browser-ui.js
+++ b/chrome/content/browser-ui.js
@@ -1808,22 +1808,28 @@ var FormHelperUI = {
       maxLength: aElement.maxLength,
       type: aElement.type,
       isAutocomplete: aElement.isAutocomplete,
       list: aElement.choices
     }
 
     this._updateContainer(lastElement, this._currentElement);
     this._zoom(Rect.fromRect(aElement.rect), Rect.fromRect(aElement.caretRect));
+
+    // Prevent the view to scroll automatically while typing
+    Browser.selectedBrowser.scrollSync = false;
   },
 
   hide: function formHelperHide() {
     if (!this._open)
       return;
 
+    // Restore the scroll synchonisation
+    Browser.selectedBrowser.scrollSync = true;
+
     // reset current Element and Caret Rect
     this._currentElementRect = null;
     this._currentCaretRect = null;
 
     this._updateContainerForSelect(this._currentElement, null);
     this._open = false;
   },