make sure popup window first shown is not longer than browser