js/css changing cursor

2019-06-12 22:40发布

问题:

I'm using css/js to change the class of an element which the pointer is hoving over. The class determines the custom cursor image.

Unfortunately, it seems as if the cursor does not update in Chrome unless I physically move the mouse. Unfortunately the app is primarily used through the keyboard, however the cursor image is pretty important.

Any way around this?

Thanks.

回答1:

This is actually a documented bug in Chrome and Safari. See this question on StackOverflow:

Getting the browser cursor from "wait" to "auto" without the user moving the mouse

I think you're out of luck for now, sorry