You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<paper-header-panel> and <paper-scroll-header-panel> share event named content-scroll
In supplied example, this event fires while using <paper-scroll-header-panel> but not with <paper-header-panel>
The problem is not with event not firing in <paper-header-panel> (there is another way to get this event) but the need to write different code for each header-panel.
Events named with the same name should have consistent behavior. The web components inside these panels should have the same code to handle scrolling - to be reusable in both.
Actual outcome
Different code has to be written for each panel type.
That was certainly a mistake in paper-scroll-header-panel. content-scroll should not bubble in first place. Also since we released app-layout, we decided to move away from this pattern. We changed the structure a little bit for the elements, so the element doesn't need to fire an event like this. Feel free to send a PR to fix this issue.
Any news on this?
'content-scroll' is never fired in my case, only thing working is adding an event listener directly to the scroller, like:
".scroller.addEventListener('scroll', function (event) { console.log("triggering"); });"
Description
<paper-header-panel>
and<paper-scroll-header-panel>
share event namedcontent-scroll
In supplied example, this event fires while using
<paper-scroll-header-panel>
but not with<paper-header-panel>
The problem is not with event not firing in
<paper-header-panel>
(there is another way to get this event) but the need to write different code for each header-panel.Also filed under: PolymerElements/paper-header-panel#83
Expected outcome
Events named with the same name should have consistent behavior. The web components inside these panels should have the same code to handle scrolling - to be reusable in both.
Actual outcome
Different code has to be written for each panel type.
Live Demo
example with
paper-scroll-header-panel
- event is firing - please see console.https://jsbin.com/yigeciyomo/edit?html,console,output
example with
paper-header-panel
- event not firing - please see console for lack of message.https://jsbin.com/miyuluxojo/edit?html,console,output
The text was updated successfully, but these errors were encountered: