I have an inventory system and i am using a menu anchor for the context menu. The problem is that it only disappears if i click a button inside it and then anywhere else, if i just click anywhere else after it opened it will not close. Does anyone know a fix or a workaround?
I found a workaround that works for now: I put a button in the back that covers the whole screen and when that is pressed I call the menu anchors close function (this means that i have to call that function on every other button if i want it to close even when i click on something). It works for now but I’m still looking for a better solution.
There is actually built-in functionality for this. If you check the “Focus Menu” option on the Open node then the Menu Anchor will put focus into the menu when it is created and will automatically close it when focus leaves the menu (which happens when you click anywhere else).