codebytere

#45813: fix: context-menu event emitted in draggable regions

Merged
Created: Feb 26, 2025, 3:34:21 AM
Merged: Feb 27, 2025, 1:44:46 PM
3 comments
Target: main

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

cc @bpasero @deepak1556

drag-emit

Checklist

Release Notes

Notes: Fixed an issue where contextmenu events wouldn't be correctly dispatched in draggable regions on Linux.

Backports

34-x-y
Merged
PR Number
#45840
Merged At
Feb 28, 2025, 4:20:43 AM
Released In
v34.3.1
Release Date
Mar 6, 2025, 10:30:47 AM
35-x-y
Merged
PR Number
#45841
Merged At
Feb 27, 2025, 4:07:54 PM
Released In
v35.0.0-beta.12
Release 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