fix setting scrollTop on headlines buffer

This commit is contained in:
Andrew Dolgov 2010-11-16 10:09:19 +03:00
parent 7923cfe97c
commit 9eac2f0db8
1 changed files with 4 additions and 4 deletions

View File

@ -1226,7 +1226,7 @@ function editTagsInsert() {
function cdmScrollToArticleId(id) {
try {
var ctr = $("headlinesInnerContainer");
var ctr = $("headlines-frame");
var e = $("RROW-" + id);
if (!e || !ctr) return;
@ -1748,10 +1748,10 @@ function cdmExpandArticle(id) {
var new_offset = $("RROW-" + id).offsetTop;
$("headlinesInnerContainer").scrollTop += (new_offset-old_offset);
$("headlines-frame").scrollTop += (new_offset-old_offset);
if ($("RROW-" + id).offsetTop != old_offset)
$("headlinesInnerContainer").scrollTop = new_offset;
$("headlines-frame").scrollTop = new_offset;
toggleUnread(id, 0, true);
toggleSelected(id);
@ -2207,7 +2207,7 @@ function correctHeadlinesOffset(id) {
try {
var container = $("headlinesInnerContainer");
var container = $("headlines-frame");
var row = $("RROW-" + id);
var viewport = container.offsetHeight;