fix: check for draggable regions outside of main frame (#41377)

This commit is contained in:
Keeley Hammond
2024-02-20 19:10:43 -08:00
committed by GitHub
parent 7cd23a4900
commit 136d7e7e6a
2 changed files with 69 additions and 4 deletions

View File

@@ -66,10 +66,10 @@ ElectronRenderFrameObserver::ElectronRenderFrameObserver(
// Initialise resource for directory listing.
net::NetModule::SetResourceProvider(NetResourceProvider);
// App regions are only supported in the main frame.
auto* main_frame = frame->GetMainRenderFrame();
if (main_frame && main_frame == frame)
render_frame_->GetWebView()->SetSupportsAppRegion(true);
// In Chrome, app regions are only supported in the main frame.
// However, we need to support draggable regions on other
// local frames/windows, so extend support beyond the main frame.
render_frame_->GetWebView()->SetSupportsAppRegion(true);
}
void ElectronRenderFrameObserver::DidClearWindowObject() {