electron: [Bug]: click event on Tray Icon is broken in Linux

Preflight Checklist

Electron Version

22.0.2

What operating system are you using?

Ubuntu

Operating System Version

Ubuntu 22.04.1 LTS

What arch are you using?

x64

Last Known Working Electron version

No response

Expected Behavior

I created a tray icon, added the context menu, and registered for a click event. when we left-click the icon it should fire the click event when right click the icon it should show the context menu.

Actual Behavior

I created a tray icon, added the context menu, and registered for a click event. when we click the icon it shows the context menu regardless of the type of click (right or left).

Testcase Gist URL

No response

Additional Information

Steps to reproduce:

On Windows:

  • it is working perfectly on windows platforms

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Comments: 17 (1 by maintainers)

Most upvoted comments

bump

Same for me. Click event not firing on Ubuntu. Works fine with Gnome or stalonetray though.

Bump

bump

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, “bump”), and we’ll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, “bump”), and we’ll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!