ArthurClemens / mithril-slider

Content slider for Mithril for mobile and desktop
30 stars 5 forks source link

Many window-level events created as slider is shown and hidden #6

Closed JohnAnthony closed 4 years ago

JohnAnthony commented 7 years ago

I'm getting double scroll events in Chrome - it looks like an extra set of pointercancel, pointermove and pointerup events are being attached. It doesn't happen every time, and I suspect a timing issue based upon how long the slider takes to render. If the slider is switched out and in again on a redraw of the view, more handlers are added.

double

Here's as stripped-down as I can get the issue. Because it's much simpler, the bug manifests less often, but in more complex code it happens every time.

https://gist.github.com/JohnAnthony/32dc028af0098a1d64adc388b3e3dc25

ArthurClemens commented 6 years ago

I can't reproduce it. Does it still happen?

JohnAnthony commented 6 years ago

It's been a long time since I looked at this. I'll have a shot at reproducing it when I get time and get back to you.