fix popup positioning
enable listener only on top window (not in iframes)