Make sure that the relevant box is in the viewport even on automation. Differential Revision: https://phabricator.services.mozilla.com/D159249
1765156