# Game lost focus in Html window when opening widget

**URL:** <https://forums.unrealengine.com/t/game-lost-focus-in-html-window-when-opening-widget/1400493>\
**Category:** Programming & Scripting\
**Tags:** HTML5, unreal-engine, Widget\
**Created:** [November 18, 2023, 1:35pm UTC](https://forums.unrealengine.com/t/game-lost-focus-in-html-window-when-opening-widget/1400493 "2023-11-18T13:35:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mikeymore](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Mikeymore](https://forums.unrealengine.com/u/Mikeymore)\
**Post date:** [November 18, 2023, 1:35pm UTC](https://forums.unrealengine.com/t/game-lost-focus-in-html-window-when-opening-widget/1400493/1 "2023-11-18T13:35:54Z")

</div>

Hi all, I am right now working in UE 4.23 to package html-5. So far so good, but the only problem is the out of focus of the game when opening a widget. So I can move the cursor out of the browser screen and have to click left in the gamescreen again to continue the game (also with closing the widget)

I am struggeling and googling a while now, but can’t get a proper working solution. Can anybody help me out with this issue?

Thanks in advance!

 ![Place widget](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/d/9/2d9cd846e37b9aedc969c5690ddadb8933705eae.jpeg)  
 ![BP widget](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/2/e/d2e4c80977c3577380e5cf5b7cc0a09f665bdf1e.jpeg)

---

<div class="post-metadata">

**Author:** ![Mikeymore](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Mikeymore](https://forums.unrealengine.com/u/Mikeymore)\
**Post date:** [November 20, 2023, 10:50pm UTC](https://forums.unrealengine.com/t/game-lost-focus-in-html-window-when-opening-widget/1400493/2 "2023-11-20T22:50:22Z")

</div>

I found that it’s not the spawning of the widget itself, but the mouse cursor appearing in the viewport.

I have tried a lot with gameinputs, locking mouse and so on, but still no luck…

Hope someone can help me out!?
