Fix selection on initial load
authorMichael M Slusarz <slusarz@curecanti.org>
Fri, 7 May 2010 21:28:00 +0000 (15:28 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Fri, 7 May 2010 21:52:14 +0000 (15:52 -0600)
imp/js/DimpBase.js
imp/js/ViewPort.js

index 00a2251..7d4dcb4 100644 (file)
@@ -502,7 +502,7 @@ var DimpBase = {
             }.bind(this),
             onContentOffset: function(offset) {
                 if (this.uid) {
-                    var row = this.viewport.getSelection().search({ imapuid: { equal: [ this.uid ] }, view: { equal: [ this.folder ] } });
+                    var row = this.viewport.createSelection('rownum', $A($R(1, this.viewport.getMetaData('total_rows')))).search({ imapuid: { equal: [ this.uid ] }, view: { equal: [ this.folder ] } });
                     if (row.size()) {
                         this.rownum = row.get('rownum').first();
                     }
index e5c1635..74901c2 100644 (file)
  *   params: (string) Current view.
  *
  * ViewPort:select
- *   Fired when rows are deselected.
+ *   Fired when rows are selected.
  *   params: (object) opts = (object) Boolean options [delay, right]
  *                    vs = (ViewPort_Selection) A ViewPort_Selection object.
  *