sdecima / javascript-detect-element-resize

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

Moving an element or parent element to another part of the DOM breaks the listener. #8

Closed dignite closed 6 years ago

dignite commented 10 years ago

I have used the library with good results :) On the site that I am developing though the elements get rearranged when the browser width is made smaller. This is achieved with jQuery append without detaching the DOM element which leaves for example click event listeners in place. This makes resizes of the element no longer fire any events. :(

Is there any work around or fix for this? Should I reinitialize the resize listener?

Reproduction: http://jsfiddle.net/a3gmxmmk/2/

Browser: Windows 7 Chrome

sdecima commented 10 years ago

This is fixed now on v0.5.3 for most browsers, except for IE 10 and below. I'm still working on a solution for those browsers.

dignite commented 10 years ago

Thank you sdecima for the quick update :+1: I have updated the version we use and it seems to work flawlessly in Chrome and Firefox at least!

temega commented 9 years ago

Close issue, anyone? :)

sdecima commented 9 years ago

@temega I didn't close this issue because I only did a partial fix, it is still not working for IE 10 and below. As I mentioned I'm working on a solution for those browsers, and will close the issue then. Thanks!

dignite commented 6 years ago

Closing this issue due to inactivity, feel free to re-open with more recent steps to reproduce if this is still an issue! 🛑