From 83d5e5bffdf83d0c324107a910de43b2088e4151 Mon Sep 17 00:00:00 2001 From: Samuel Mannehed Date: Mon, 21 Oct 2019 11:25:01 +0200 Subject: [PATCH] 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 Co-authored-by: Niko Lehto --- kasmweb/core/util/cursor.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kasmweb/core/util/cursor.js b/kasmweb/core/util/cursor.js index 63de741..cd6b72c 100644 --- a/kasmweb/core/util/cursor.js +++ b/kasmweb/core/util/cursor.js @@ -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) {