nw.js
nw.js copied to clipboard
click event on tray does not work
NWJS Version : 0.34.5 Operating System : Windows 10
Expected behavior
Click on tray icon, the click-event-callback should be invoked.
Actual behavior
the callback is not invoked.
How to reproduce
It doesn't happen certainly, but it happens frequently. I don't find a way to reproduce this issue.
Sometimes it happens rightly after app starting up. Sometimes you must wait a long time before it happens again.
Other infomation
The main page is not navigated.
When this happens, the tooltip and icon of the tray can be updated, so I am sure that the tray is not GCed,
When this happens, I try to remove current tray, and create a new tray, but still, the callback is not invoked.
When this happens, chrome.runtime.reload()
should make the app re-initialize the tray, but still, the callback is not invoked.
Could you please provide a minimal sample to reproduce it?
@rogerwang Now I know what causes this issue. My app will call chrome.runtime.reload()
in some situation automaticaly. After reload, the tray's click event callback
is broken, but you can still update the icon and tooltip of the tray.
I make a sample to reproduce it. you can download it through this page. Note: this file will expire after 24 hours. You can click the buttons at the bottom of this APP to reproduce this issue.
I've created a simplified version to reproduce the issue.
Note that if you remove the tray prior to causing a refresh this issue is prevented.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I'am facing the same problem here, did anybody have a look into it?
Wen I click on the tray menu nothing happens, I have tried in Ubuntu 19.10 and Windows 10
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I have the same problem, is there a solution for this issue? In my case, I use MacOS.