I think that you can just do:
`}).then(focus).then(function() {`