mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 03:15:56 +00:00
rework previous to be less jumpy
This commit is contained in:
@@ -931,10 +931,12 @@ const Headlines = {
|
|||||||
const row = $("RROW-" + current_id);
|
const row = $("RROW-" + current_id);
|
||||||
|
|
||||||
if (row) {
|
if (row) {
|
||||||
const sibling = row.nextSibling;
|
const next = row.nextSibling;
|
||||||
|
|
||||||
if (sibling && Element.visible(sibling) && sibling.id == "headlines-spacer") {
|
// hsp has half-screen height in auto catchup mode therefore we use its first child (normally A element)
|
||||||
App.Scrollable.scrollTo(sibling, $("headlines-frame"));
|
if (next && Element.visible(next) && next.id == "headlines-spacer" && next.firstChild) {
|
||||||
|
$("headlines-frame").scrollTop = $("headlines-spacer").offsetTop -
|
||||||
|
$("headlines-frame").offsetHeight + next.firstChild.offsetHeight;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user