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

[Problem/Bug]: Position of select inputs not updating #4324

Open
josago97 opened this issue Jan 26, 2024 · 6 comments
Open

[Problem/Bug]: Position of select inputs not updating #4324

josago97 opened this issue Jan 26, 2024 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@josago97
Copy link

josago97 commented Jan 26, 2024

What happened?

When deploying a select input, the dropdown takes the position of the last position where the element was, not where the input currently is. Furthermore, if you display the select and move the window, the display remains fixed, its position is not relative to the select input.

image

Importance

Important. My app's user experience is significantly compromised.

Runtime Channel

Stable release (WebView2 Runtime)

Runtime Version

121.0.2277.83

SDK Version

121.0.2277.83

Framework

Other

Operating System

Windows 10

OS Version

Windows 10 Pro 22H2

Repro steps

  1. Create a hybrid application with an EbView2 container.
  2. Add a select input with several options to the html.
  3. Run the application, display the select and move the window.

Repros in Edge Browser

No

Regression

No, this never worked

Last working version (if regression)

No response

@josago97 josago97 added the bug Something isn't working label Jan 26, 2024
@josago97 josago97 changed the title [Problem/Bug]: Position of select elements not updating [Problem/Bug]: Position of select inputs not updating Jan 26, 2024
@tochukwuIbeEkeocha
Copy link
Contributor

tochukwuIbeEkeocha commented Jan 29, 2024

Hello,

Thanks for taking the time to file this issue. To accurately understand and triage this problem could you help us clarify what framework you are using for your app? For example is it Win32, UWP, WinForms, WPF, WinAppSDK, etc...

Also, are you using this API in your app: NotifyParentWindowPositionChanged. Its purpose is to make the parent window aware of window position changes.

@josago97
Copy link
Author

I'm using Photino, this is the website and this is its Github repository.

I am not using that API and I don't know if Photino uses it. I'm going to put an issue in their repository to see if they are using it.

@MikeYeager
Copy link

I am one of the maintainers of Photino. We have just implemented this call on WM_MOVE and WM_MOVING and validated that it is being called, however, the problem remains. We are currently using the WebView2 NuGet package version 1.0.1462.37. The link above is for a pre-release version where the method is part of a host object. We're implementing this on the controller object: https://learn.microsoft.com/en-us/dotnet/api/microsoft.web.webview2.core.corewebview2controller.notifyparentwindowpositionchanged?view=webview2-dotnet-1.0.1462.37 Please advise.

@josago97
Copy link
Author

Hello,

Thanks for taking the time to file this issue. To accurately understand and triage this problem could you help us clarify what framework you are using for your app? For example is it Win32, UWP, WinForms, WPF, WinAppSDK, etc...

Also, are you using this API in your app: NotifyParentWindowPositionChanged. Its purpose is to make the parent window aware of window position changes.

Any ideas why the API is not working correctly?

@MikeYeager
Copy link

We are loading the webview control from a Win32 native window in C++. We are calling NotifyParentWindowPositionChanged on both WM_MOVE and WM_MOVING in the event loop and have validated that it is being called. It appears to have no effect on the webview control.

@josago97
Copy link
Author

josago97 commented Mar 17, 2024

@victorhuangwq @tochukwuIbeEkeocha I've been testing with other libraries and they suffer from the same problem. There are many posts reporting the bug, some even saying that it doesn't work well in Tauri either. Are you sure the API works fine?

.NET MAUI (It uses Microsoft.AspNetCore.Components.WebView.Maui)
image

AvaloniaUI (It uses Microsoft.Web.WebView2.WinForms)
image

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

3 participants