-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Local cursor not supported in IE or Edge #572
Comments
Here is another couple of relevant links:
Unfortunately, it doesn't seem that IE/Edge are going to support either data URIs or the "none" option to hide the cursor. One option we could explore is the PointerLock API which would allow us to hide the cursor and then render our own directly in the canvas. However the downside is that the captures the pointer inside the canvas and it requires user permission. Probably the best option that would work everywhere (all browsers and older versions too) would be to change the cursor to a blank cursor file and then directly render the mouse in the canvas. It's not as nice as just having the browser to the work of rendering the cursor for us, but it's the best option I can think of for supporting this widely if we think it's important. |
Thank you @kanaka Wouldn't rendering the mouse in the canvas be quite slow? |
@samhed I think it would be pretty efficient. I also thought of a more efficient method: whenever the cursor is changed, you would just create a separate cursor sized transparent canvas with that cursor rendered inside it (this shouldn't happen that often and it's basically something we already do when the local cursor changes). Then, whenever you get a mouse move event you position the canvas at that position over the main canvas area. |
I don't see a cursor in Google Chrome either. With TigerVNC x0vncserver and novnc, there is no cursor. |
@JSkier21 your problem is not related to this issue. Please open a new issue. |
Some browsers (*cough* IE *cough*) don't support cursors via data URIs, and touch devices sometimes don't have proper cursors, so we had to rely on remote cursor support in some cases. Instead, we can now display local cursors by rendering the cursor to a transparent canvas (with pointer events disabled on that mini-canvas) when we encounter those conditions, meaning we can now advertise local cursor support in all conditions. Fixes #572.
Some browsers (*cough* IE *cough*) don't support cursors via data URIs, and touch devices sometimes don't have proper cursors, so we had to rely on remote cursor support in some cases. Instead, we can now display local cursors by rendering the cursor to a transparent canvas (with pointer events disabled on that mini-canvas) when we encounter those conditions, meaning we can now advertise local cursor support in all conditions. Fixes #572.
Instead of changing too much of code and using manually rendered canvas in place of a mouse. I have used a workaround for novnc 1.0.0. Replace
With
and use
in _sendEncodings(); As Edge does not support data-URI. We are simply using pseudoEncodingCursor and not disabling local cursor. This will stop mouse cursor from being kind of unresponsive. Worked for Me. The only Drawback with this approach is that the mouse will not change cursor icons. It will only show the default cursor. Which is not a very big issue. |
@sourabhtiwari Are you seeing any practical problems with the approach merged in #1032 or are you simply sharing a different workaround you guys are using? |
Normally we use a data uri to store the cursor, we then use this URI as a value for style.cursor on the canvas. However, this isn't supported in any version of Internet Explorer or Microsoft Edge.
http://caniuse.com/#search=cursor
http://caniuse.com/#feat=datauri
Can anyone think of another way to support local cursor in noVNC?
The text was updated successfully, but these errors were encountered: