lifegadget / ui-slider

A visually attractive slider for ambitious Ember apps
https://ui-slider.firebaseapp.com/
MIT License
30 stars 39 forks source link

willDestroyElement is called twice #7

Closed mrDoktar closed 8 years ago

mrDoktar commented 8 years ago

Using the ui-slider component and transitioning to a new route causes the willDestroyElement to be called twice. Once directly and once through the event listener.

To fix this one can either remove: https://github.com/lifegadget/ui-slider/blob/master/addon/components/ui-slider.js#L314

_d: on('willDestroyElement', function() { return this.willDestroyElement(); }),

or rename https://github.com/lifegadget/ui-slider/blob/master/addon/components/ui-slider.js#L332

willDestroyElement: function() { ... }

to something else (and also renaming it in the event listener on line 314). Example:

_d: on('willDestroyElement', function() { return this.willDestroyElementOnce(); }),
willDestroyElementOnce: function() { ... }    
mrDoktar commented 8 years ago

Using emberjs 2.0

yankeeinlondon commented 8 years ago

Ahh thanks. Will get this fixed today.

yankeeinlondon commented 8 years ago

@mrDoktar try out npm 0.1.5 ... the problem should be fixed there. I'll close this for now but please reopen if you're still having issues.