stutrek/scrollmonitor

IE11 error on removed elements

Opened this issue · 2 comments

Watchers with their watchItem removed by eg. $('.watched-element').remove() will run in to an error on IE11, when trying to access the .getBoundingClientRect()

@stutrek: Can we check at: https://github.com/stutrek/scrollMonitor/blob/46993cd5eb48fc4bafa1d20d77c958dd09d11d35/src/watcher.js#L127 that if watchItem exist in DOM tree, otherwise skip the operations?

If you send me a PR with a check I will accept it. I am very busy in my work and personal lives right now. Thanks