From: Michael M Slusarz Date: Tue, 22 Dec 2009 05:25:30 +0000 (-0700) Subject: Fix rownum determination when rownum is originally not in buffer X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=55f2de2d055ca16fec1b1ebc0d1c9ccb0aefe49c;p=horde.git Fix rownum determination when rownum is originally not in buffer --- diff --git a/imp/js/DimpBase.js b/imp/js/DimpBase.js index 0487e5bab..12301bf20 100644 --- a/imp/js/DimpBase.js +++ b/imp/js/DimpBase.js @@ -497,13 +497,15 @@ var DimpBase = { var row = this.viewport.getSelection().search({ imapuid: { equal: [ this.uid ] }, view: { equal: [ this.folder ] } }); if (row.size()) { this.rownum = row.get('rownum').first(); - this.viewport.scrollTo(this.rownum, { noupdate: true, top: true }); - offset = this.viewport.currentOffset(); } this.uid = null; - } else if (this.rownum) { - offset = this.rownum - 1; } + + if (this.rownum) { + this.viewport.scrollTo(this.rownum, { noupdate: true, top: true }); + offset = this.viewport.currentOffset(); + } + return offset; }.bind(this), onSlide: this.setMessageListTitle.bind(this)