Replies: 1 comment
-
|
Test with
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am experiencing an issue with HTML
<select>elements in a WPF application usingCefSharp.Wpfwith off-screen rendering.After navigating to a page, clicking a
<select>element does not display the dropdown popup. The rest of the page remains responsive and clickable.The issue is not limited to one specific page. It occurs across different pages of the website.
The dropdown starts working immediately after either:
However, after navigating to another page, the issue usually returns.
Environment
CefSharp.Wpf149.0.60Steps to reproduce
ChromiumWebBrowser.<select>elements.<select>element.Actual result
The click appears to be received, but the dropdown popup is not visible.
Workarounds that immediately restore the dropdown
After a resize, the same
<select>works correctly without reloading the document.Navigating to another page may cause the issue to return.
Expected result
The
<select>dropdown popup should appear normally after every page navigation without requiring a window resize or page reload.Important observation
The fact that resizing or minimizing/restoring the WPF window fixes the problem without reloading the page suggests that the issue may be related to OSR rendering, popup surface synchronization, browser size notification, or popup geometry.
In CefSharp WPF OSR, the
<select>dropdown appears to be rendered through the separate popup surface, including:OnPopupShowOnPopupSizeOnPaintwithisPopup = truePART_popupImageThe main browser surface continues to render correctly, but the popup surface may remain invalid or unsynchronized after navigation.
A possible sequence is:
Browser visibility handling
The application contains a custom
ChromiumWebBrowsersubclass with an override similar to this:This was added to keep the browser active while the WPF control or application is not visible.
I am currently investigating whether forcing
WasHidden(false)may leave the internal CEF state different from the actual WPF visibility state.The issue also appears to be related to page navigation, not only to hiding and showing the browser.
Cef command-line arguments
The application currently uses some non-default CEF command-line arguments:
I understand that these flags may affect OSR rendering or popup composition. I am preparing isolated tests without these flags.
The most suspicious flags currently are:
Tests performed
Test 1 — Reload
Reloading the page makes the
<select>dropdown work.Test 2 — Minimize and restore
Minimizing and restoring the WPF window makes the dropdown work without reloading the page.
Test 3 — Small window resize
Changing the window size by a few pixels also makes the dropdown work.
Test 4 — Navigate to another page
After navigating to another page, the dropdown may stop appearing again.
This makes a JavaScript
preventDefault()issue less likely, because resizing the native WPF window fixes the existing document without changing the JavaScript or DOM.Suspected areas
The issue may involve one or more of the following:
WasResized()after page loadPART_popupImagenot being updated or displayeddisable-gpuanddisable-gpu-compositingWasHiddenstateResizeHackEnabledQuestions
Is this a known issue in CefSharp 149 or the matching CEF/Chromium version?
Are there known regressions involving OSR
<select>popups after page navigation?Is
ResizeHackEnabledexpected to help with this type of issue?Is it safe or recommended to call
WasResized()andInvalidate()after the main frame finishes loading?Could forcing
WasHidden(false)while the WPF browser is actually hidden cause popup rendering problems?Are
disable-gpuanddisable-gpu-compositingknown to affect popup widgets in CefSharp WPF OSR?Which callbacks would be most useful to log:
OnPopupShowOnPopupSizeOnPaint(isPopup: true)OnBrowserWasHiddenOnRenderSizeChangedBeta Was this translation helpful? Give feedback.
All reactions