diff --git a/shell/browser/ui/views/inspectable_web_contents_view_views.cc b/shell/browser/ui/views/inspectable_web_contents_view_views.cc index 8fb4d4c61e4..cf9e7f47d7b 100644 --- a/shell/browser/ui/views/inspectable_web_contents_view_views.cc +++ b/shell/browser/ui/views/inspectable_web_contents_view_views.cc @@ -142,8 +142,11 @@ void InspectableWebContentsViewViews::CloseDevTools() { devtools_visible_ = false; if (devtools_window_) { - inspectable_web_contents()->SaveDevToolsBounds( - devtools_window_->GetWindowBoundsInScreen()); + auto save_bounds = devtools_window_->IsMinimized() + ? devtools_window_->GetRestoredBounds() + : devtools_window_->GetWindowBoundsInScreen(); + inspectable_web_contents()->SaveDevToolsBounds(save_bounds); + devtools_window_.reset(); devtools_window_web_view_ = nullptr; devtools_window_delegate_ = nullptr;