Fix page nav calculation

It appears as if a previous condition (as noted in the former comment)
is no longer true. Include the direct parent in computation.

Bug: Issue 8810
Change-Id: If7d01d0ade230daa0ec1a9be20cee8d9272d496f
This commit is contained in:
Becky Siegel
2018-04-27 15:32:32 -07:00
parent 9813123504
commit 083398efac

View File

@@ -35,9 +35,7 @@
_handleBodyScroll() {
if (this._headerHeight === undefined) {
let top = this._getOffsetTop(this);
// Don't want to include the element that wraps around the nav, start
// with its parent.
for (let offsetParent = this._getOffsetParent(this.offsetParent);
for (let offsetParent = this.offsetParent;
offsetParent;
offsetParent = this._getOffsetParent(offsetParent)) {
top += this._getOffsetTop(offsetParent);