I think I’ve caught an edge case around the bInteractableWhenSelected on the Common Button that means Selected buttons sometimes can’t be clicked (which is a pain when using CommonListViews, which by default want to Select buttons as you navigate).
The issue is that, depending on the order you set some of the button’s flags, it doesn’t always work.
bInteractableWhenSelected interacts with InteractionEnabled, Selected, and Toggleable like so:
- In SetIsInteractableWhenSelected, we also check Selected and Toggleable before calling SetInteractionEnabled
- In SetIsToggleable, we also check Selected and either IteractionEnabled or InteractableWhenSelected before calling SetInteractionEnabled
- In SetSelectedInternal, we check Toggleable, Interactable and InteractableWhenSelected before calling SetInteractionEnabled
- In SetIsInteractionEnabled, we check Selected and Toggleable but NOT InteractableWhenSelected before setting InteractionEnabled on the RootButton
I think the fix is as simple as making
770 if (!GetSelected() || bToggleable)
into
770 if (!GetSelected() || bToggleable || bInteractableWhenSelected)
Does that seem correct? Any gotchas I’m missing here?