Skip to content
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

Not able to render custom cursor #3388

Open
Take-A-Byte opened this issue Apr 12, 2023 · 9 comments
Open

Not able to render custom cursor #3388

Take-A-Byte opened this issue Apr 12, 2023 · 9 comments
Assignees
Labels
bug Something isn't working

Comments

@Take-A-Byte
Copy link

Take-A-Byte commented Apr 12, 2023

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
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Author

This is helpful! Thanks 🙇

@Take-A-Byte
Copy link
Author

@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
Copy link
Contributor

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
Copy link
Author

Thanks 🙇

@orosbogdan
Copy link

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

@0exception
Copy link

is there any way to use custom cursor in webview2?

@elias-ik
Copy link

elias-ik commented Jul 8, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants