sdecima / javascript-detect-element-resize

A Cross-Browser, Event-based, Element Resize Detection
MIT License
880 stars 151 forks source link

Remove all element listeners on remove resize #49

Open drazenp opened 7 years ago

drazenp commented 7 years ago

If plugin was removed from an element, not all events where removed which result in triggering function scrollListener and trowing error resetTriggers. Removed animationstartevent event. Removed scroll event which was added in capturing phase, but not removed on the same phase. Additionally small code cleanup applied.

The fix is applied to both libraries (vanilla and jquery).