Headlines.move: fix move to previous article if scrollTop returns a fractional value for current item
This commit is contained in:
parent
b1c5ebdace
commit
7e2fd9bdce
|
@ -895,7 +895,7 @@ define(["dojo/_base/declare"], function (declare) {
|
||||||
if (!noscroll) {
|
if (!noscroll) {
|
||||||
Article.scroll(-ctr.offsetHeight / 2, event);
|
Article.scroll(-ctr.offsetHeight / 2, event);
|
||||||
} else {
|
} else {
|
||||||
if (row && row.offsetTop < ctr.scrollTop) {
|
if (row && Math.round(row.offsetTop) < Math.round(ctr.scrollTop)) {
|
||||||
Article.cdmScrollToId(Article.getActive(), noscroll, event);
|
Article.cdmScrollToId(Article.getActive(), noscroll, event);
|
||||||
} else if (prev_id) {
|
} else if (prev_id) {
|
||||||
Article.setActive(prev_id);
|
Article.setActive(prev_id);
|
||||||
|
|
Loading…
Reference in New Issue