#45813: fix: context-menu event emitted in draggable regions
Merged
Description of Change
Closes #45301.
Takes a similar approach as #44978 - we intercept potential right clicks and disable draggable regions temporarily to allow the events to punch through. Draggable regions only respond to left-click dragging, but the system will still suppress right-clicks in a draggable region, so this effectively allows contextmenu events to be dispatched as expected. I'm also looking into addressing this on Windows, but we'll probably need to take a different approach.
Tested with https://gist.github.com/bpasero/b04271deaacf0e099b0a0fa2289e8d28
Checklist
- PR description included and stakeholders cc'd
-
npm testpasses - PR release notes describe the change in a way relevant to app developers, and are capitalized, punctuated, and past tense.
Release Notes
Notes: Fixed an issue where contextmenu events wouldn't be correctly dispatched in draggable regions on Linux.
Backports
34-x-y
MergedPR Number
#45840Merged At
Feb 28, 2025, 4:20:43 AM
Released In
v34.3.1Release Date
Mar 6, 2025, 10:30:47 AM
35-x-y
MergedPR Number
#45841Merged At
Feb 27, 2025, 4:07:54 PM
Released In
v35.0.0-beta.12Release Date
Feb 27, 2025, 4:10:36 PM
Semver Impact
Major
Breaking changes
Minor
New features
Patch
Bug fixes
None
Docs, tests, etc.
Semantic Versioning helps users understand the impact of updates:
- Major (X.y.z): Breaking changes that may require code modifications
- Minor (x.Y.z): New features that maintain backward compatibility
- Patch (x.y.Z): Bug fixes that don't change the API
- None: Changes that don't affect using facing parts of Electron
