PolymerElements / app-layout

App layout elements
https://webcomponents.org/element/PolymerElements/app-layout
597 stars 311 forks source link

app-header threshold-triggered is not reset #570

Closed govis closed 5 years ago

govis commented 5 years ago

Description

When an element containing app-header-layout is removed and added back to the DOM the app-header threshold-triggered attribute is not reset even though app-header-layout is scrolled all the way to the top.

Expected outcome

thresholdTriggered is false

image

Actual outcome

thresholdTriggered is true

image

Live Demo

https://jsbin.com/bopuhozupa

Steps to reproduce

Open the page in a web browser notice that the header image is visible - thresholdTriggered is false. As you start scrolling it will hide thresholdTriggered is true. Scroll to the bottom and press the "NEXT PAGE" button. Noew page will be created and work the same way. Do it again and now the page comes up without the header image.

Browsers Affected

keanulee commented 5 years ago

I think we can fix this by invoking the code in AppScrollEffectsBehavior._scrollHandler() on attached(). Need time to do and write tests for this.