]> git.proxmox.com Git - mirror_novnc.git/commitdiff
Check next elem at mouseleave in cursor emulation
authorSamuel Mannehed <samuel@cendio.se>
Mon, 21 Oct 2019 09:25:01 +0000 (11:25 +0200)
committerSamuel Mannehed <samuel@cendio.se>
Mon, 21 Oct 2019 11:10:13 +0000 (13:10 +0200)
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>
core/util/cursor.js

index 63de74197156c26acf6b2782364adee3e4839879..cd6b72cf8f63d28b9b5b5fc97cddf4e2bfb2a4b4 100644 (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) {