improve popup positioning on scrolling windows