# Widget button focus is lost when mouse clicked

**URL:** <https://forums.unrealengine.com/t/widget-button-focus-is-lost-when-mouse-clicked/771137>\
**Category:** UI\
**Tags:** unreal-engine, question\
**Created:** [February 15, 2023, 9:05am UTC](https://forums.unrealengine.com/t/widget-button-focus-is-lost-when-mouse-clicked/771137 "2023-02-15T09:05:51Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![hib0823](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@hib0823](https://forums.unrealengine.com/u/hib0823)\
**Post date:** [February 15, 2023, 10:59am UTC](https://forums.unrealengine.com/t/widget-button-focus-is-lost-when-mouse-clicked/771137/2 "2023-02-15T10:59:14Z")

</div>

I searched for simple methods to do something similar to this and found these posts. Anyone who has better ideas, you are welcome to reply.

[Hide Mouse](https://forums.unrealengine.com/t/hide-mouse-widget-confusion/428952)  
I found that the widget also affects cursor visibility, not only the player controller. This was why I couldn’t hide my mouse even if I used ‘player controller-set show mouse cursor’.

[Easy fix! - losing UI focus on mouse click](https://www.youtube.com/watch?v=6JH7Wyz8f-0)  
This guy suggests to make a huge invisible button covering the entire screen. Whenever this is clicked, the ‘on-click’ event will make focus on the menu buttons again and prevent losing focus from the menu buttons. Clicking anywhere on the screen will lead to clicking the screen-sized button and trigger the ‘on-click’ event of it.

So I hid my mouse cursor from the widget blueprint’s panel settings, and made a screen-sized invisible button in order to force my focus on the menu buttons no matter where I click.

---

_[View the full topic](https://forums.unrealengine.com/t/widget-button-focus-is-lost-when-mouse-clicked/771137)._
