# HTML5 Widget Interaction Area Offset

**URL:** <https://forums.unrealengine.com/t/html5-widget-interaction-area-offset/378137>\
**Category:** Platform & Builds\
**Tags:** HTML5, javascript, unreal-engine, Widget, UE4, question, CPP\
**Created:** [December 2, 2016, 6:25pm UTC](https://forums.unrealengine.com/t/html5-widget-interaction-area-offset/378137 "2016-12-02T18:25:24Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_62063234](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_62063234](https://forums.unrealengine.com/u/anonymous_user_62063234)\
**Post date:** [December 2, 2016, 6:25pm UTC](https://forums.unrealengine.com/t/html5-widget-interaction-area-offset/378137/1 "2016-12-02T18:25:24Z")

</div>

Related to: [HTML-5 mouse UI input not recognized - Platform & Builds - Epic Developer Community Forums](https://answers.unrealengine.com/questions/520941/html-5-mouse-ui-input-not-recognized.html)

It appears the mouse input is in fact recognized to a certain point. At viewport coordinates below about 1280x512, widgets are interactive.Outside that range, widgets don’t appear to receive mouse input.

UE 4.13.2, happens identically in Chrome and Firefox.

Windowed:

 ![117167-windowed+interact+limit+box.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/8/2/f82d9ff50085f2fc688ad8e127e8ffb50ae1d95a.png)

Fullscreen:

 ![117168-fullscreen+interact+limit+box.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/6/f/76f008359f072bc6022cfa78243706a947bca561.png)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_62063234](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_62063234](https://forums.unrealengine.com/u/anonymous_user_62063234)\
**Post date:** [December 2, 2016, 8:21pm UTC](https://forums.unrealengine.com/t/html5-widget-interaction-area-offset/378137/2 "2016-12-02T20:21:05Z")

</div>

In windowed mode, calling r.SetRes 640x360 and then r.SetRes 1280x720 again cuts the X-axis interaction area to below 640, while the Y-axis stays at below 512.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_62063234](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_62063234](https://forums.unrealengine.com/u/anonymous_user_62063234)\
**Post date:** [December 5, 2016, 6:24pm UTC](https://forums.unrealengine.com/t/html5-widget-interaction-area-offset/378137/3 "2016-12-05T18:24:52Z")

</div>

If anyone has an idea of where I could potentially look in the source to find out how to fix this, that would be wonderful! I’m mostly just digging through the HTML5-related files in the engine code and not really finding anything helpful.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_62063234](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_62063234](https://forums.unrealengine.com/u/anonymous_user_62063234)\
**Post date:** [December 5, 2016, 8:31pm UTC](https://forums.unrealengine.com/t/html5-widget-interaction-area-offset/378137/4 "2016-12-05T20:31:23Z")

</div>

Applying the current code implementation to 4.12.5 works fine. Seems there’s something that got broken in 4.13.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_62063234](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_62063234](https://forums.unrealengine.com/u/anonymous_user_62063234)\
**Post date:** [January 4, 2017, 7:46pm UTC](https://forums.unrealengine.com/t/html5-widget-interaction-area-offset/378137/5 "2017-01-04T19:46:53Z")

</div>

That said, I’d love if someone could point me in the right direction so I could fix it. 😛

---

<div class="post-metadata">

**Author:** ![Stephen\_Ellis](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/stephen_ellis/32/1210665_2.png) [@Stephen\_Ellis](https://forums.unrealengine.com/u/Stephen_Ellis)\
**Post date:** [January 11, 2017, 6:31pm UTC](https://forums.unrealengine.com/t/html5-widget-interaction-area-offset/378137/6 "2017-01-11T18:31:08Z")

</div>

Hi Jonathan.

I’m moving this post into the ‘Bug Reports’ section so our support team can investigate whether there may be a bug here. We’ll follow up soon if we have additional questions for you to help reproduce this.

Cheers

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_62063234](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_62063234](https://forums.unrealengine.com/u/anonymous_user_62063234)\
**Post date:** [January 11, 2017, 9:38pm UTC](https://forums.unrealengine.com/t/html5-widget-interaction-area-offset/378137/7 "2017-01-11T21:38:06Z")

</div>

I was able to fix this in 4.13 by:

1. Changing the UE\_GSystemResolution\_Res in Engine\Source\Runtime\HTML5\HTML5JS\Private\HTML5JavaScriptFx.js to 1920x1080 from 800x600,
2. By setting the web page canvas dimensions to UE\_GSystemResolution\_Res in the resize\_game() function in the templated HTML page (GameX.html.template).

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_7e4e2181](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_7e4e2181](https://forums.unrealengine.com/u/anonymous_user_7e4e2181)\
**Post date:** [January 12, 2017, 3:33am UTC](https://forums.unrealengine.com/t/html5-widget-interaction-area-offset/378137/8 "2017-01-12T03:33:20Z")

</div>

good hunting!

just to give you a heads up, this issue is coming from a canvas resize handler that was partially complete. the situation exacerbated on retina screens.

the fix is a little more involved and will become available for 4.16 (the 4.15 window is locked down).

to explain, jonathan - your solution will work if your screen does not resize or is not of your defined resolution.

that said, the use of UE\_GSystemResolution\_Res{X,Y} is the initial condition (at start) – but those functions will be remapped to the C++ versions after FPlatformOpenGLDevice::FPlatformOpenGLDevice() is called (look for the UE\_GSystemResolution() call).

anyways, i can give more details – but, just wanted to let you all know that a more proper fix is coming in that will handle retina screens, dynamic window sizing, and jumping in and out of full screen mode a little better.

---

<div class="post-metadata">

**Author:** ![SBK3d](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SBK3d](https://forums.unrealengine.com/u/SBK3d)\
**Post date:** [May 22, 2017, 6:43pm UTC](https://forums.unrealengine.com/t/html5-widget-interaction-area-offset/378137/9 "2017-05-22T18:43:05Z")

</div>

Hi,  
This might not fit directly to the context above, but just wounder if this is related to the widget interaction component working together with the web browser widget plugin?  
Reason for asking is finding a way to navigate using VR. Or might there be another solution for navigating/ interacting with the web browser widget in VR?  
Had a look at a tutorial using “Set Input Mode- Game and UI” with the web browser widget using the mouse movement.  
Wounder how the same concept could be replicated with VR?

Happy for any input.
