Skip to content

Commit 65533d8

Browse files
committed
fix js.
1 parent 5173e01 commit 65533d8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/_layouts/stdlib-reference.html

+3-1
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@
365365
}
366366
// Restore scrollbar position.
367367
window.onbeforeunload = function() {
368-
window.name = (-tocInner.getBoundingClientRect().top).toString();
368+
window.name = tocColumn.scrollTop.toString();
369369
};
370370
if (window.name != null)
371371
{
@@ -398,6 +398,8 @@
398398
function isSectionFullyVisible(id)
399399
{
400400
var titleElement = subSectionTitles[id];
401+
if (titleElement == null)
402+
return false;
401403
var nextTitleElement = subSectionTitles[id+1];
402404
return (titleElement.getBoundingClientRect().top >= 0 && nextTitleElement.getBoundingClientRect().top <= window.innerHeight);
403405
}

0 commit comments

Comments
 (0)