Close widget on lost focus


I have been trying to set up a menu to select stuff and came across 2 problems:

ONE: when i close my widget on the close button it closes but i need to press the open widget key (Z) twice for the widget to apear again.

TWO: when i try to close on lost focus and press anywhere on the widget it closes, and i get problem one again, what i need is to close when i click outside the widget.
If i unplug the “event on focus lost” the widget does it was made for correctly when i press the buttons.

if i press Z twice it opens and closes correctly

Controller BP where i open and close

widget BP where i try to close it

widget image


can someone help me understand the issue here?
Thanks is advance

I have been able to slove problem two, but not the first one.
My widget closes on clicking anywhere, inside or outside the widget, i only need it to close outside, since my buttons are not doing their job with this bug where goes lost focus BP.

correction* solved problem ONE

You can set visibility rather than calling remove from parent. I’m not sure why people use remove from parent as a means to hiding the widget.

Remove from parent is sometimes useful for performance reasons. After a widget is garbage collected it will stop generating mouse related events but while it is not garbage collected, even when hidden, it will. And slate is a slow beast.