Retain the viewport focus on resize.