Wait for the focus event before simulating a key press to fix an intermittent Mac-only test failure (bug 895426); r=me