I do prefer to listen for `blur` events instead. What you did is also correct.