Native pickers are hidden behind topmost parent windows #4646
Replies: 2 comments
-
Converting to discussion as these are implemented entirely in
Is there are reason you are doing this instead of using https://github.com/cefsharp/CefSharp.Wpf.HwndHost That's the supported method of hosting the native browser in
I believe CEF only checks for If you create new A very quick test with |
Beta Was this translation helpful? Give feedback.
-
Short/lazy answer for the reasons we are wrapping wfa into wpf date back to the touch-behaviours of much older versions. It is possible we don’t need to do this today but we haven’t had the time to evaluate. Recreating the browser is a great idea and I will give it a try. Thank you so much. |
Beta Was this translation helpful? Give feedback.
-
Is there an existing issue for this?
CefSharp Version
119.4.30
Operating System
Windows 11
Architecture
x86
.Net Version
.NEt 4.7.2
Implementation
WinForms
Reproduction Steps
Our page is using OS native CSS pickers for times, dates and colours. For example,
Our application is WPF with a Grid which is dynamically populated with a WindowsFormsHost which in turn contains our CefSharp.WinForms.ChromiumWebBrowser.
Our application launches without topmost, in which case native pickers work (appear on top of our app). However we have a "KIOSK" mode which can be enabled after launch, in which case our top application declared TopMost. Once it does so, native pickers do not appear. (Debugging shows they do show up, but behind our top window).
I have have attempted a hack by enumerating child windows of our application, and the native pickers are not found as children. They are found if I enumerate ALL desktop windows. So I suspect the creation of the native pickers is not setting the window parent.
Expected behavior
Actual behavior
Created windows have neither parents nor TopMost inherited, causing them to not appear.
Regression?
I have not found a version in which this works.
Known Workarounds
Avoiding use of TopMost. I have considered running a timer to identify the windows and manually set themt to TopMost, but this would be a messy and implementation dependent hack.
Does this problem also occur in the CEF Sample Application
Not Tested
Other information
I cannot build the cefclient so I cannot recreate it being topmost. I can build CefSharp.WinForms.Example, and if you add "this.TopMost = true;" following IntializeComponent(); in BrowserForm constructor, the behavior does appear i.e. native pickers are hidden.
Beta Was this translation helpful? Give feedback.
All reactions