It's not obvious that we want to hide the cursor when we get a leave, it depends on the element that we're leaving to. This makes the code more robust. Co-authored-by: Alex Tanskanen <aleta@cendio.se> Co-authored-by: Niko Lehto <nikle@cendio.se>