Viewport size takes body size if documentElement size is invalid 

Contrary to all other browsers, IE8- have documentElement.clientWidth and documentElement.clientHeight set to 0 if the page is scrollable, thus reporting a viewport of size 0x0 and preventing popups from being considered inside the viewport.