Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Checks for existing scrollTarget before overwriting #548

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions app-header-layout/app-header-layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,10 @@
// the content until the height of the header can be read.
this.$.wrapper.classList.remove('initializing');
// Update scroll target.
header.scrollTarget = this.hasScrollingRegion ?
this.$.contentContainer :
this.ownerDocument.documentElement;
header.scrollTarget =
header.scrollTarget !== header._defaultScrollTarget ? header.scrollTarget
: this.hasScrollingRegion ? this.$.contentContainer
: this.ownerDocument.documentElement;
// Get header height here so that style reads are batched together before
// style writes (i.e. getBoundingClientRect() below).
var headerHeight = header.offsetHeight;
Expand Down