fix: ensure dragging works again after emitting contextmenu event (#48199)

This commit is contained in:
Shelley Vohr
2025-08-29 16:37:37 +02:00
committed by GitHub
parent 7373173e44
commit e892840975
2 changed files with 1 additions and 5 deletions

View File

@@ -324,11 +324,6 @@ bool NativeWindowViews::PreHandleMSG(UINT message,
return false;
}
case WM_RBUTTONUP: {
if (!has_frame())
electron::api::WebContents::SetDisableDraggableRegions(false);
return false;
}
case WM_GETMINMAXINFO: {
WINDOWPLACEMENT wp;
wp.length = sizeof(WINDOWPLACEMENT);

View File

@@ -142,6 +142,7 @@ bool ElectronDesktopWindowTreeHostWin::HandleMouseEvent(ui::MouseEvent* event) {
if (prevent_default) {
electron::api::WebContents::SetDisableDraggableRegions(true);
views::DesktopWindowTreeHostWin::HandleMouseEvent(event);
electron::api::WebContents::SetDisableDraggableRegions(false);
}
return prevent_default;
}