Page 1 of 1

[C++] Hide context menu after focus inside

Posted: 21 Aug 2017, 12:46
by realesmedia
I create custom context menu on right mouse button.
When context menu shows I can close it by clicking outside of the context menu.
If I click on active elements (such as slider, buttons, checkitems) inside custom context menu I can't close it by clicking outside. How can I fix this behaviour?

I temporarily add OnMouseLeave event with next code:
menu->SetIsOpen(false);
but it crashed on Win7 in xaml view MouseMove().

Re: [C++] Hide context menu after focus inside

Posted: 23 Aug 2017, 20:27
by sfernandez
I was able to reproduce this bug, could you please report it in the bugtracker?
Thanks for reporting.

As a workaround try calling the following:
menu->GetMouse()->Capture(menu, CaptureMode_SubTree)
Let me know if it works correctly for you.

Re: [C++] Hide context menu after focus inside

Posted: 24 Aug 2017, 09:15
by realesmedia
could you please report it in the bugtracker?
Issue #1138 was created.