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:
parent
496195db4e
commit
5313ae17e4
1 changed files with 4 additions and 3 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue