Added window focus trigger

To fix a bug when the browser is resized and the tab that has the
stretched element isn’t focused