Mouse cursor disappears on keypress event in jQuery

I use arrow keys to move an object into my code. Everything works fine, except that the mouse cursor disappears when I press any of the arrow keys. How to make the cursor remain visible? I use this code check to press the arrow keys.

$(document).ready(function() { $(document).keydown(function(event) { checkKeys(event); }).keyup(function(event) { keyUp(event); }); }); 
+4
source share
1 answer

This is browser behavior (maybe even OS behavior!), You probably won't find a way to stop it with javascript.

It is designed to hide the cursor so that you can see what you are typing. Try it on any website, keystrokes always make the mouse cursor go away.

+5
source

All Articles