Same thing here, we can move `window2.activate()` after the call to `continueAfterFocus`.