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:
parent
fcd99d04fb
commit
938690375b
|
@ -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) {
|
||||||
|
|
Loading…
Reference in New Issue