It seems body.scrollTop (and body.scrollLeft) are deprecated in ES5 strict-mode. What is the reason for this, given that it still seems okay to use
body.scrollTop
body.scrollLeft
The following code works for me to set the popup in a correct position whenever the click event fires, for all browsers.
var scrollTop = window.scrollY; //For all browsers. var scrollTop = document.body.scrollTop; //This works for only IE Edge specific versions