Widget OnMouseButtonUp only activates on double-click

It works as expected apart from the fact that it will only respond to a double-click:

Any ideas why?

The widget has only one element - border, and nothing else.

Solution: one needs to capture the mouse first, and by default it’s captured by the viewport (in most cases I guess).

Handling it in OnMouseButtonDown first seems to work just fine: