Open ghost opened 8 years ago
Instead of using on-content-scroll
, you can use Aurelia's content-scroll.trigger="scrollHandler($event)"
. In theory, .delegate
should work as well, but I've been having some issues with it.
Thanks! I'll give it a try.
I've tried scroll.trigger and scroll.delegate and it is not working...
It is the same behavior when I'm trying to intercept a change in a paper-input with on-change="changeDetected" or change.delegate="changeDetected()".
I just had it working with content-scroll.delegate
. What version of Aurelia are you using?
<paper-scroll-header-panel class="flex" content-scroll.delegate="headerScroll($event)">
<paper-toolbar>
<div>Hello, World!</div>
</paper-toolbar>
<div class="content" innerhtml.bind="text">
</div>
</paper-scroll-header-panel>
As for the paper-input
, I'm not sure where this is actually documented, but it looks like the event name is input
now, so input.delegate
ought to work.
For change
in particular, there might be something about the shadow DOM spec that Polymer is accounting for.
Hi,
I'm having some trouble with event delegation. In this case, with the on-content-scroll event of paper-header-panel.
As it is specified in the component documentation:
<paper-header-panel on-content-scroll="scrollHandler">...</paper-header-panel>
But the event is not triggering. Seems like the customAttribute feature of Aurelia is overwriting it...Any clue?