sdecima/javascript-detect-element-resize — pull request #10 by jerjou (2014-10-21 22:47:03+00:00)
Title: Reset scroll positions if the dom node has been detached and reattached.

Detaching a dom node will cause the scroll positions to reset to 0, causing the 'scroll' event to no longer fire when resizing. So - detect when the element is being added to the dom, and reset the scroll positions so that we can continue to detect resizes.