HTML5 Widget Interaction Area Offset

Related to: HTML-5 mouse UI input not recognized - Platform & Builds - Epic Developer Community Forums

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.



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.

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.

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

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

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.


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).

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.

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.