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

inconsistent event "content-scroll" #97

Open
alfalabs opened this issue May 7, 2016 · 2 comments
Open

inconsistent event "content-scroll" #97

alfalabs opened this issue May 7, 2016 · 2 comments

Comments

@alfalabs
Copy link

alfalabs commented May 7, 2016

Description

<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.

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

@blasten
Copy link
Contributor

blasten commented May 25, 2016

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.

@tcuje
Copy link

tcuje commented Oct 16, 2016

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"); });"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants