New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: emit click events with tray context menu #24200
Conversation
Release Notes Persisted
|
I was unable to backport this PR to "8-x-y" cleanly; |
I have automatically backported this PR to "10-x-y", please check out #24235 |
I have automatically backported this PR to "9-x-y", please check out #24236 |
@codebytere has manually backported this PR to "8-x-y", please check out #24239 |
Description of Change
Closes #24196.
When a context menu is added to a Tray on macOS, the menu controller overrides the
mouseUp
handler, where click events were emitted. This fixes the issue by pulling click event handling into a separate function, and emitting click events onmouseDown
when a menu controller has been set and normally onmouseUp
otherwise.Tested with https://gist.github.com/1ffed70969360d362c807d60fe692404.
cc @MarshallOfSound @nornagon @zcbenz
Checklist
npm test
passesRelease Notes
Notes: Fixed an issue with click events not being emitted on macOS for Trays with context menus set.