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
parent fcd99d04fb
commit 938690375b
1 changed files with 2 additions and 1 deletions

View File

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