mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 17:15:55 +00:00
only update floatingTitle innerHTML if active article changes
This will boost scrolling performance pretty much and avoid flickering of floatingTitle
This commit is contained in:
@@ -2208,9 +2208,10 @@ function updateFloatingTitle() {
|
||||
|
||||
var header = child.getElementsByClassName("cdmHeader")[0];
|
||||
|
||||
$("floatingTitle").setAttribute("rowid", child.id);
|
||||
$("floatingTitle").innerHTML =
|
||||
header.innerHTML;
|
||||
if (child.id != $("floatingTitle").getAttribute("rowid")) {
|
||||
$("floatingTitle").setAttribute("rowid", child.id);
|
||||
$("floatingTitle").innerHTML = header.innerHTML;
|
||||
}
|
||||
|
||||
if (child.offsetTop < hf.scrollTop - header.offsetHeight - 100 &&
|
||||
child.offsetTop + child.offsetHeight - hf.scrollTop > 100)
|
||||
|
||||
Reference in New Issue
Block a user