1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 21:25: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:
Veit Lehmann
2013-06-09 02:02:14 +03:00
parent 496195db4e
commit 5313ae17e4

View File

@@ -2208,9 +2208,10 @@ function updateFloatingTitle() {
var header = child.getElementsByClassName("cdmHeader")[0]; var header = child.getElementsByClassName("cdmHeader")[0];
if (child.id != $("floatingTitle").getAttribute("rowid")) {
$("floatingTitle").setAttribute("rowid", child.id); $("floatingTitle").setAttribute("rowid", child.id);
$("floatingTitle").innerHTML = $("floatingTitle").innerHTML = header.innerHTML;
header.innerHTML; }
if (child.offsetTop < hf.scrollTop - header.offsetHeight - 100 && if (child.offsetTop < hf.scrollTop - header.offsetHeight - 100 &&
child.offsetTop + child.offsetHeight - hf.scrollTop > 100) child.offsetTop + child.offsetHeight - hf.scrollTop > 100)