Bug 518619: When touching rows in a list, scroll partially visible rows into view [r=mark.finkle]
authorFabrice Desré <fabrice.desre@gmail.com>
Fri, 23 Oct 2009 10:40:48 -0400
changeset 65702 1dbd7b0bed258eaeacc486ca3162fcb7013a5a82
parent 65701 ab03ded470c23eda646a3215ed4033c6ab5a9b3a
child 65703 4dd89bfaf8f0b5bbce57ef37bbb9068edbab0802
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
bugs518619
Bug 518619: When touching rows in a list, scroll partially visible rows into view [r=mark.finkle]
mobile/chrome/content/browser.xul
mobile/chrome/content/extensions.js
--- a/mobile/chrome/content/browser.xul
+++ b/mobile/chrome/content/browser.xul
@@ -329,25 +329,25 @@
             </richlistbox>
           </notificationbox>
         </vbox>
 
         <vbox id="downloads-container" flex="1">
           <hbox id="downloads-header" class="panel-header">
             <label value="&downloadsHeader.label;" flex="1"/>
           </hbox>
-          <richlistbox id="downloads-list" flex="1"/>
+          <richlistbox id="downloads-list" flex="1" onselect="this.ensureSelectedElementIsVisible()"/>
         </vbox>
 
         <vbox id="prefs-container" flex="1">
           <hbox id="prefs-header" class="panel-header">
             <label value="&prefsHeader.label;"/>
           </hbox>
           <notificationbox id="prefs-messages" flex="1">
-            <richlistbox id="prefs-list" seltype="single" flex="1">
+            <richlistbox id="prefs-list" seltype="single" flex="1" onselect="this.ensureSelectedElementIsVisible()">
               <setting title="&about.title;" type="control">
                 &about.description;
                 <button id="prefs-about-button" label="&about.button;"
 #ifdef MOZ_OFFICIAL_BRANDING
 # these two point to the same page, this just matters for what shows up in the
 # URL bar
                         oncommand="BrowserUI.newTab('about:firefox', true);"/>
 #else
--- a/mobile/chrome/content/extensions.js
+++ b/mobile/chrome/content/extensions.js
@@ -203,16 +203,17 @@ var ExtensionsView = {
       return;
     
     let items = this._list.childNodes;
     for (let i = 0; i < items.length; i++) {
       let item = items[i];
       if (item.hideOptions)
         item.hideOptions();
     }
+    this._list.ensureSelectedElementIsVisible();
   },
 
   get visible() {
     let panel = document.getElementById("panel-container");
     let items = document.getElementById("panel-items");
     if (panel.hidden == false && items.selectedPanel.id == "addons-container")
       return true;
     return false;