contextual_menu icon indicating copy to clipboard operation
contextual_menu copied to clipboard

[Windows] Menu stays open after users click off it

Open benthillerkus opened this issue 3 years ago • 2 comments

Currently, after opening a menu -- if the menu is not inside the app window -- the menu will stay open until it is interacted with.

The platform native behaviour would be to close the menu if the users clicks somewhere that is not the menu.

benthillerkus avatar May 16 '22 20:05 benthillerkus

It seems that I've been running into this. When adding SetForegroundWindow and PostMessage this misbehavior is resolved. Unfortunately, as a consequence, the entire app window is send into foreground when doing so. There has to be a way to achieve this without running into this, as native and electron apps are able to do it just fine.

benthillerkus avatar May 18 '22 00:05 benthillerkus

Maybe we can listen to the mouse click event and hide it after the mouse click

lijy91 avatar May 20 '22 13:05 lijy91