Check next elem at mouseleave in cursor emulation

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>
This commit is contained in:
Samuel Mannehed 2019-10-21 11:25:01 +02:00 committed by Lauri Kasanen
parent 19dfb7901c
commit 83d5e5bffd

View File

@ -132,7 +132,8 @@ export default class Cursor {
}
_handleMouseLeave(event) {
this._hideCursor();
// Check if we should show the cursor on the element we are leaving to
this._updateVisibility(event.relatedTarget);
}
_handleMouseMove(event) {