fix: draggable regions with devtools open (#29696)

This commit is contained in:
Shelley Vohr 2021-06-16 18:58:30 +02:00 committed by GitHub
parent 6fd9e4280c
commit d59e2d7b2e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 25 additions and 9 deletions

View file

@ -127,6 +127,10 @@ void InspectableWebContentsViewViews::ShowDevTools(bool activate) {
} else {
devtools_window_->ShowInactive();
}
// Update draggable regions to account for the new dock position.
if (GetDelegate())
GetDelegate()->DevToolsResized();
} else {
devtools_web_view_->SetVisible(true);
devtools_web_view_->SetWebContents(
@ -227,6 +231,9 @@ void InspectableWebContentsViewViews::Layout() {
devtools_web_view_->SetBoundsRect(new_devtools_bounds);
contents_web_view_->SetBoundsRect(new_contents_bounds);
if (GetDelegate())
GetDelegate()->DevToolsResized();
}
} // namespace electron