diff options
author | Andrew Dolgov <[email protected]> | 2020-01-08 08:51:40 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2020-01-08 08:51:40 +0300 |
commit | 7e2fd9bdce4a0ff05e7c76aee52e30c26d5b2093 (patch) | |
tree | 955a86c47bf416201db7b853adcbf3567dd81151 | |
parent | b1c5ebdacee0fc6907c0259338637f8b384f270d (diff) |
Headlines.move: fix move to previous article if scrollTop returns a fractional value for current item
-rwxr-xr-x | js/Headlines.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/js/Headlines.js b/js/Headlines.js index 5b7aac0b0..d54ff4d4f 100755 --- a/js/Headlines.js +++ b/js/Headlines.js @@ -895,7 +895,7 @@ define(["dojo/_base/declare"], function (declare) { if (!noscroll) { Article.scroll(-ctr.offsetHeight / 2, event); } else { - if (row && row.offsetTop < ctr.scrollTop) { + if (row && Math.round(row.offsetTop) < Math.round(ctr.scrollTop)) { Article.cdmScrollToId(Article.getActive(), noscroll, event); } else if (prev_id) { Article.setActive(prev_id); |