fix: removeBrowserView draggable region removal (#39387)

fix: removeBrowserView draggable region removal

Closes https://github.com/electron/electron/issues/39377.
This commit is contained in:
Shelley Vohr 2023-08-08 10:23:14 +02:00 committed by GitHub
parent 1548a2f9fb
commit 8f4f82618c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -780,8 +780,8 @@ void BaseWindow::RemoveBrowserView(gin::Handle<BrowserView> browser_view) {
browser_view.ToV8());
if (iter != browser_views_.end()) {
window_->RemoveBrowserView(browser_view->view());
window_->RemoveDraggableRegionProvider(browser_view.get());
window_->RemoveBrowserView(browser_view->view());
browser_view->SetOwnerWindow(nullptr);
iter->Reset();
browser_views_.erase(iter);