As above, poor man’s FlipFlops:
When it’s the widget closing the menu, also set that boolean to the desired state.