mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 16:15:55 +00:00
cdmScrollToArticleId: use more natural scrolling
This commit is contained in:
@@ -1132,7 +1132,11 @@ function cdmScrollToArticleId(id) {
|
||||
|
||||
if (!e || !ctr) return;
|
||||
|
||||
ctr.scrollTop = e.offsetTop;
|
||||
if (e.offsetTop+e.offsetHeight > (ctr.scrollTop+ctr.offsetHeight) ||
|
||||
e.offsetTop < ctr.scrollTop) {
|
||||
|
||||
ctr.scrollTop = e.offsetTop;
|
||||
}
|
||||
|
||||
} catch (e) {
|
||||
exception_error("cdmScrollToArticleId", e);
|
||||
|
||||
Reference in New Issue
Block a user