MicrosoftEdge / WebView2Feedback

Feedback and discussions about Microsoft Edge WebView2
https://aka.ms/webview2
439 stars 51 forks source link

Not able to render custom cursor #3388

Open Take-A-Byte opened 1 year ago

Take-A-Byte commented 1 year ago

Description

If we try to use a custom cursor inside a UWP app, we get a default cursor instead of a specified cursor. It does not even render the fallback cursor.

Version SDK: 1.0.1661.34 Framework: UWP & WinUI3 OS: Win11

Repro Steps

  1. Load local index.html with the following content in a UWP app inside WebView2

    <!DOCTYPE html>
    <html lang="en">
    <head>
    <style>
        html, body {
            width: 100%;
            height: 100%;
        }
    
        #root {
            width: 100%;
            height: 100%;
            background: aqua;
            cursor: url("circle.ico"), crosshair;
        }
    </style>
    </head>
    <body>
    <div id="root"></div>
    </html>

Expected Output Cursor is rendered as circle.ico or crosshair

Actual Output Default cursor is rendered

Additional context If we use cursor: crosshair; instead, the crosshair is rendered

david-risney commented 1 year ago

This is an existing issue for WebView2 in UWP apps: #1925. I'm going to make sure we get this listed in our docs for now.

david-risney commented 1 year ago

I've added a section to this doc https://learn.microsoft.com/en-us/microsoft-edge/webview2/get-started/winui2#custom-cursors about custom cursors not working. That doc covers various things that are currently not supported in WebView2 in UWP and that content should be moved in the near future into its own separate doc (its sort of hard to find right now in the Getting Started doc)

Take-A-Byte commented 1 year ago

This is helpful! Thanks 🙇

Take-A-Byte commented 1 year ago

@david-risney I just noticed that cursor: none also does not work. Could you please verify this and add it to the documentation?

david-risney commented 1 year ago

Yes, thanks. Looks like some of the other built-in cursor kinds don't work as well. Like help, wait, crosshair work, but progress, grab, don't. I'll update that, thanks.

Take-A-Byte commented 1 year ago

Thanks 🙇

orosbogdan commented 9 months ago

Any updates on this issue, facing the same in Blazor Hybrid with .NET 8.

0exception commented 2 months ago

is there any way to use custom cursor in webview2?

elias-ik commented 2 months ago

Some of the resize cursors don't work either, for example ew-resize doesn't work, while col-resize does work.

ChaseIngersol commented 1 week ago

Any updates? Still running into this today...