[Bug]: Render process does not catch pointer events properly in frameless mode within -webkit-app-region: drag; element
Preflight Checklist
- [X] I have read the Contributing Guidelines for this project.
- [X] I agree to follow the Code of Conduct that this project adheres to.
- [X] I have searched the issue tracker for a bug report that matches the one I want to file, without success.
Electron Version
24.2.0
What operating system are you using?
macOS
Operating System Version
Ventura 13.2
What arch are you using?
arm64 (including Apple Silicon)
Last Known Working Electron version
22.3.8
Expected Behavior
Steps to Reproduce:
Set BrowserWindow property "frame" to "false". Set "-webkit-app-region: drag" on the body of an HTML file. Try to catch UIEvents "pointerdown" and "pointerup" on any elements within the draggable parent.
Expected result: The app should catch and handle the "pointerdown" and "pointerup" events.
Actual Behavior
Actual Result: The app does not catch the "pointerdown" events as expected. Instead, it catches a two-finger "pointerdown" event only. Additionally, "pointerup" events are not caught at all.
Workaround: Add explicitly property -webkit-app-region: no-drag; to the elements that need to be listened to. But in version 22.3.8 it was possible to hook the event.shiftKey event and leave the whole window dragged on a normal click, and be able to listen to UI events when the Shift key was pressed.
Testcase Gist URL
https://gist.github.com/99fc6e7521a7e3e44d6110b49c0dd061
Additional Information
This bug was not present in the previous work version of Electron (22.3.8).
It has the same behavior in 23.0.0 release as well.
Duplicate of #37789, which in turn is probably a duplicate of like a dozen identical issues. This is probably one of the most submitted issues. Primarily because of how annoying it is.
Closing as duplicate of https://github.com/electron/electron/issues/37789