I am facing a weird issue with common ui. When deactivating an ActivableWidget from stack, it does not get completely removed from memory and holds on to the focus (visually its removed from screen). This only happens for the first time, from second time onwards it works fine.
Deactivate removes it from memory after the first try? I always though that Deactivate keeps it in memory. It should lose focus though, nly sure what would stop that. Do you use the transition timer? I have seen that fail to switch focus.
You could use the OnDeactivated function inside the widget to manually set the focus if it’s not setting the focus correctly.
If you don’t need the widget again you could also try destory or remove from parent.
Sorry , ignore the memory part , it wont matter if its in memory or not. On first try it will not let go of the focus for some reason. I also tried remove from parent , but it has the same result.
Yeah that is strange. Only a little annoying. What are you changing the focus to? It could be that object isn’t being set properly. So when it.trys the first time it dosn’t switch the focus but then when you try again that object is now working correctly so it works.
Ok i managed to fix it , so i followed some tutorial by unreal and they suggested to set focus on activate event. Because of this Set focus was calling twice.
So once it was set on [Self] because no buttons were created and once on the button. Because of this when button used to lose focus the main widget used to retain focus.
The reason why it didn’t in second try was because these buttons were already added hence focus to self was never executed.
Solution: Remove set focus “On Activate” Event.