From 65ea99c881ad60e8e9b2aeaad77ba50a5ec4ed68 Mon Sep 17 00:00:00 2001 From: Benny Powers Date: Mon, 23 Apr 2018 11:33:50 +0300 Subject: [PATCH 1/2] Checks for existing scrollTarget before overwriting Fixes #547 --- app-header-layout/app-header-layout.html | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app-header-layout/app-header-layout.html b/app-header-layout/app-header-layout.html index 61076265..f5b03daf 100644 --- a/app-header-layout/app-header-layout.html +++ b/app-header-layout/app-header-layout.html @@ -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; From f213e9ca744fc9e502e5b29fffc60a2523c6ee8f Mon Sep 17 00:00:00 2001 From: Benny Powers Date: Mon, 23 Apr 2018 11:36:19 +0300 Subject: [PATCH 2/2] Tixes Fypo --- app-header-layout/app-header-layout.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app-header-layout/app-header-layout.html b/app-header-layout/app-header-layout.html index f5b03daf..e7eb4177 100644 --- a/app-header-layout/app-header-layout.html +++ b/app-header-layout/app-header-layout.html @@ -179,7 +179,7 @@ this.$.wrapper.classList.remove('initializing'); // Update scroll target. header.scrollTarget = - !header.scrollTarget === header._defaultScrollTarget ? 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