Input gating and UButtons

We are attempting to gate input to multiple UMG buttons on a menu, but seeing undesired behavior. For example:

Button1 and Button2 exist in MenuWidget’s scene, and Focusable is set to false:

Hold Button1

Hold Button2 (both actions allowable via MenuWidget’s visibility settings)

Release Button1 (Onclick fired, which calls MenuWidget.SetVisibility(HitTestInvisible) therefore disabling input on the menu)

Release Button2 (Onclick fired, undesired behavior, MenuWidget is HitTestInvisible)

It appears that Pressed events go a different route than Released events, which bypasses checks against MenuWidget’s visibility. We are currently looking at intercepting the OnClick event (either on UButton, or a wrapper blueprint), checking against MenuWidget’s visibility, and then proceeding accordingly, but this doesn’t seem like the best approach. Would your UMG experts have insight into a better solution?

How does Widget Focusablility play into this?

Thank you.

Edit:
After some further investigation into the role of IsFocusable, it appears that buttons with IsFocusable are inconsistent in their reproduction of this issue:

Hold Button1

Hold Button2

Release Button1 (OnClick fires, calls Menu.SetVisibility(HitTestInvisible))

Release Button2 (OnClick DOESN’T fire as desired)

but the second repro attempt shows:

Hold Button1

Hold Button2

Release Button1 (OnClick fires, calls Menu.SetVisibility(HitTestInvisible))

Release Button2 (OnClick fires)

IsFocusable appears to manipulate the mouse/touch capture of the buttons, leaving them in a state that affects the next repro attempt.

I work with jstrubh. This issue is causing a lot of bugs for us and we would love to get an answer soon.

Here is the issue stated a different way:

  1. Button’s parent is set to SelfHitTestInvisible
  2. Player is able to press and hold that button
  3. During the press, button’s parent is set to HitTestInvisible
  4. Player releases the button
  5. Button’s OnClicked fires

To us, it seems inappropriate that OnClicked would fire since input has been disabled through the parent of that button.

Without a Slate fix, we would have a hard time blocking against the case where a player holds down two buttons at once and releases them, since both would fire OnClicked regardless of us disabling input after the first release.