Incorrect dimension on HTML5 when changing size of a bitmap

I am developing a web app, and I have a big background on it, 1920x1080 pixels. Also, the app is auto-resizable in HTML5 : <window width="0" height="0" if="html5" />.
If I resize by hand the window, the bg is changing correctly; if I hit the window mode and then the maximize button, the image will not change his dimension.
What is strange is, if I change the picture to be 1919x1079, the picture scale correctly.
The stage dimensions received are ok, and is happening on all browsers I’ve tested (Chrome, Edge, Firefox) and also on neko target.
In flash target, this works ok.

The resizable mode means that we listen to resize events on the window, and look at the size of the parent DIV element, if you embed into a DIV. How that DIV resizes may be up to your specific CSS, or whether the browser is triggering events?

I forgot to mention that the webapp is just an OpenFL project.
I’ve isolated the problem into another project, here is the link :
My logs are on neko:

  • image with 1919x1079 : Main.hx:41: Resize to 1920x1006, image is now : 1920x1006
  • image with 1920x1080 : Main.hx:41: Resize to 1920x1006, image is now : 1666x1006

Hmm, this seems to work here.

What desktop are you using, what version of Lime and OpenFL?


I’m using openfl 8.3.0 and lime 6.4.0, windows 10; and web tests were made with Firefox 61.0.1, Edge 42.17134.1.0 and Chrome 67.0.3396.99.
I’ve added on the same link my bin folder with html5 build, maybe in the resulted js is something different than yours.

Also, make sure to resize the web window and then maximize it.