moveToPost: tweak unexpanded 'prev' behavior

This commit is contained in:
Andrew Dolgov 2013-03-21 09:38:25 +04:00
parent 7b7daed93b
commit 24c215e2bb

View file

@ -560,8 +560,13 @@ function moveToPost(mode, noscroll) {
var ctr = $("headlines-frame");
if (!getInitParam("cdm_expanded")) {
if (!noscroll && article.offsetTop < ctr.scrollTop) {
scrollArticle(-ctr.offsetHeight/3);
} else {
cdmExpandArticle(prev_id);
cdmScrollToArticleId(prev_id, true);
}
} else {
if (!noscroll && article && article.offsetTop < ctr.scrollTop) {