nw.js icon indicating copy to clipboard operation
nw.js copied to clipboard

Contextual submenu crashes on Windows 10

Open pragma-git opened this issue 4 years ago • 2 comments

NWJS Version : v50.1 and v53.0 Operating System : Windows

Expected behavior

Navigating menu and submenu. Should work, and should keep the open popup menu object intact until closed.

Actual behavior

Similar problem to reported in issue #4697.

nw_submenu_crash_windows.zip Difference to issue #4697: here the problem occurs on submenus, but not on top menuitems

Navigating menu works but submenu crashes after a while. Crashes on Windows 10, not on Mac. nw_submenu_crash_windows.zip

How to reproduce

In attached demo code (modified from code in issue #4697 ) : Click the button, and navigate to popup submenu. Move mouse up and down in the open submenu. After some seconds the app crashes.

nw_submenu_crash_windows.zip

pragma-git avatar May 04 '21 21:05 pragma-git

context_menu.zip

There is my simple context menu example in the attached zip file. I am using simmilar code in the big project at link above.

There is a link to video about menu behavior: https://youtu.be/rEB6rWujinI?si=HNsx8crPcpR7KZpG

OS: Windows 10 The program is crashed some time after mouse click, or mouse move without click. This behavior is very randomly. Many time all are good, but some time it is not. There are no any syntaxis or runtime errors messages. Please, help. The context menu is very helpfull feature!

demvlad avatar Feb 17 '24 18:02 demvlad

I have worked around the problem by keeping an array of references to the menu and submenu items. I only clear that array once the full menu is closed.

It helps on Windows, and does not harm MacOS or Linux.

pragma-git avatar Feb 19 '24 09:02 pragma-git