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

Context menu does not scale as expected #2918

Closed
MarkusSchreiner opened this issue Oct 31, 2022 · 2 comments
Closed

Context menu does not scale as expected #2918

MarkusSchreiner opened this issue Oct 31, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@MarkusSchreiner
Copy link

MarkusSchreiner commented Oct 31, 2022

Description

I have a problem with the scaling of the context menu of WebView2.
We are developing a C++ MFC application in which various instances of WebView2 are integrated.

For various reasons, we set the scaling factors manually. Depending on which Windows DPI setting is currently selected by the user (125%, 150%, ...).

To accomplish this, I first call the function
put_ShouldDetectMonitorScaleChanges(FALSE)
and afterwards
put_RasterizationScale().
I call these directly in the ICoreWebView2CreateCoreWebView2ControllerCompletedHandler after successfully instantiating WebView2.

Since this call alone is apparently not sufficient to scale the content at all, I also call put_RasterizationScale() after each navigation event (in ICoreWebView2NavigationCompletedEventHandler).

(by the way: the official documentation of WebView2 is very sparse...)

The actual content of Webiew2 is scaled correctly, but the right-click context menu is not. This looks like this (depending on the Windows DPI setting):

image

image

Am I using the call to put_RasterizationScale() in the wrong place?
When should this call be made correctly?
Or is this still a bug?

A little help would be great!

Version
SDK: 1.0.1370.28
Runtime: 107.0.1418.24
Framework: Win32, MFC
OS: Win10, v1909 (Build 18363.2274)
AB#

@MarkusSchreiner MarkusSchreiner added the bug Something isn't working label Oct 31, 2022
@victorthoang victorthoang assigned johna-ms and bradp0721 and unassigned johna-ms Nov 2, 2022
@victorthoang
Copy link

victorthoang commented Nov 2, 2022

Hello @MarkusSchreiner,

Thanks for your bug report. I've assigned this to a dev that can best try to follow up on this. If they find that it is a bug, then we will add it to our tracked backlog to prioritize further!

edit: it is currently something we are already tracking in our backlog and is being worked on. In general could be a couple months out.

@champnic
Copy link
Member

champnic commented Mar 4, 2023

Fixed in runtimes 110.0.1577.0+. Thanks!

@champnic champnic closed this as completed Mar 4, 2023
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