SRetainerBox and SInvalidationPanel don't update their hit test grid correctly when widget visibility changes.

We are able to work around this issue with two Engine modifications. In both SInvalidationPanel and SRetainerWidget’s PaintSlowPath function, simply adding the following at the start resolves the issue:

`int32 SRetainerWidget::PaintSlowPath(const FSlateInvalidationContext& Context)
{
HittestGrid->Clear();

…`

Steps to Reproduce
In UMG, create a widget with the following elements:

  1. Create a RetainerBox or InvalidationBox
    1. Inside, add an overlay containing a button (any interactable element)
    2. Add a border over the whole overlay, covering the button.
  2. Create a button (utility, for modifying #1)

In Button #2’s OnClick handler, make the border from 1b change visibility to Collapsed. Expected behavior is that you can interact with 1a, but in practice input is still routed to the collapsed border and never makes it to the button.

Hi,

Thanks for reporting this. It looks like we made the same fix for SRetainerWidget (CL#40790289) though we haven’t ran into the same problem with invalidation panels. Are there any other steps I might need to trigger the stale hit test grid in an invalidation panel? It should be safe enough to clear the grid, but it would be best to have a repro case we can test against to verify it’s fixed.

Best,

Cody

You’re right, I wasn’t able to reproduce the issue in my sample project with an Invalidation Box element. As best as I can tell, when changing the visibility of the blocking SBorder element, the SInvalidationPanel widget has bNeedsPrepass set to false, whereas it’s true in the case of SRetainerWidget. I can’t quite get a handle on when or how exactly the two differ, but that does seem to lead to the invalidation panel recalculating its hit test grid, not leading to the issue.

Hi,

I’ll do a bit more testing and see if I can reproduce it, but otherwise we’ll keep an eye out for similar reports. I doubt there’s any harm in clearing the hit test grid in the invalidation box’s PaintSlowPath if you wanted to keep that change locally.

Best,

Cody