Forums Help/Bug

element.getOffsetParent error thrown in prototype after closing window/scrolling in IE

Subscribe to element.getOffsetParent error thrown in prototype after closing window/scrolling in IE 1 post, 1 voice

 
Avatar Ron 1 post

After I open a window and close it, once you attempt to scroll the page in IE, it throws an error in Prototype’s getOffsetParent’s function:

getOffsetParent: function(element) { if (element.offsetParent) return $(element.offsetParent); <<<< this line

By wrapping this if statement in a try/catch block, all is good (code execution continues in method).

Forums Help/Bug