Draw overlays for input elements before focusing in focusInput

This prevents us from drawing the overlays in the wrong place if the window scrolls to focus the chosen input (eg. when it is on the boundary of the page). Fixes #1257.
This is what was done anyway (by `return if visibleInputs.length == 1`). I've literally just switched around the order and wrapped everything that was after that return with `unless visibleInputs.length == 1`.