Skip to content

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

Merged
jkleinsc merged 1 commit intomainfrom
fix-re-enable-draggable
Aug 29, 2025
Merged

fix: ensure dragging works again after emitting contextmenu event#48199
jkleinsc merged 1 commit intomainfrom
fix-re-enable-draggable

Conversation

@codebytere
Copy link
Copy Markdown
Member

Description of Change

Closes #48179.

Fixes an issue where dragging sometimes didn't work after the contextmenu event was emitted. This happened because WM_RBUTTONUP can be racy with the mousehandler, so the call to electron::api::WebContents::SetDisableDraggableRegions(false) didn't always happen as expected. Fix this by consolidating logic into ElectronDesktopWindowTreeHostWin::HandleMouseEvent.

Checklist

Release Notes

Notes: Fixed an issue where dragging sometimes didn't work after the contextmenu event was emitted.

@electron-cation electron-cation bot added the new-pr 🌱 PR opened recently label Aug 28, 2025
@codebytere codebytere added semver/patch backwards-compatible bug fixes target/36-x-y PR should also be added to the "36-x-y" branch. target/37-x-y PR should also be added to the "37-x-y" branch. target/38-x-y PR should also be added to the "38-x-y" branch. labels Aug 28, 2025
@codebytere codebytere force-pushed the fix-re-enable-draggable branch from 63d3361 to cf387d2 Compare August 28, 2025 08:27
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened recently label Aug 29, 2025
@jkleinsc jkleinsc merged commit e892840 into main Aug 29, 2025
57 checks passed
@jkleinsc jkleinsc deleted the fix-re-enable-draggable branch August 29, 2025 14:37
@release-clerk
Copy link
Copy Markdown

release-clerk bot commented Aug 29, 2025

Release Notes Persisted

Fixed an issue where dragging sometimes didn't work after the contextmenu event was emitted.

@trop
Copy link
Copy Markdown
Contributor

trop bot commented Aug 29, 2025

I have automatically backported this PR to "38-x-y", please check out #48224

@trop trop bot removed the target/38-x-y PR should also be added to the "38-x-y" branch. label Aug 29, 2025
@trop
Copy link
Copy Markdown
Contributor

trop bot commented Aug 29, 2025

I have automatically backported this PR to "36-x-y", please check out #48225

@trop
Copy link
Copy Markdown
Contributor

trop bot commented Aug 29, 2025

I have automatically backported this PR to "37-x-y", please check out #48226

@trop trop bot added in-flight/36-x-y in-flight/37-x-y merged/36-x-y PR was merged to the "36-x-y" branch. and removed target/36-x-y PR should also be added to the "36-x-y" branch. target/37-x-y PR should also be added to the "37-x-y" branch. in-flight/36-x-y labels Aug 29, 2025
@trop trop bot added merged/37-x-y PR was merged to the "37-x-y" branch. merged/38-x-y PR was merged to the "38-x-y" branch. and removed in-flight/37-x-y in-flight/38-x-y labels Aug 29, 2025
dodolalorc pushed a commit to dodolalorc/electron that referenced this pull request Sep 11, 2025
nilayarya pushed a commit to nilayarya/electron that referenced this pull request Nov 21, 2025
nilayarya added a commit to nilayarya/electron that referenced this pull request Nov 21, 2025
nilayarya added a commit to nilayarya/electron that referenced this pull request Nov 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged/36-x-y PR was merged to the "36-x-y" branch. merged/37-x-y PR was merged to the "37-x-y" branch. merged/38-x-y PR was merged to the "38-x-y" branch. semver/patch backwards-compatible bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Preventing the default behavior of the "system-context-menu" event causes the drag region ineffective.

3 participants