Merge "Use adjusted popup window position when calculating best-fit" into nyc-dev