Fix dismissal of select popups on NotifyMoveOrResizeStarted (see issue #3294)

This impacts both Alloy and Chrome runtimes when using a native parent window.
This commit is contained in:
Marshall Greenblatt
2022-04-09 14:00:09 -04:00
parent 0428438e72
commit 5f4bccd672
6 changed files with 2 additions and 29 deletions

View File

@@ -261,14 +261,11 @@ void CefBrowserPlatformDelegateAlloy::SendCaptureLostEvent() {
#if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC))
void CefBrowserPlatformDelegateAlloy::NotifyMoveOrResizeStarted() {
if (!browser_)
if (!web_contents_)
return;
// Dismiss any existing popups.
auto frame = browser_->GetMainFrame();
if (frame && frame->IsValid()) {
static_cast<CefFrameHostImpl*>(frame.get())->NotifyMoveOrResizeStarted();
}
web_contents_->ClearFocusedElement();
}
#endif