From 3f059b90d61d946b6f5d606c8a306ec71ea305b9 Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Tue, 9 Mar 2021 23:37:34 +0100 Subject: [PATCH] [HTML5] Properly set canvas size during setup. It used to be updated before the first iteration, causing the window/viewport size values to be incorrect during the initialization phase (e.g. during the first `_ready` notification). --- platform/javascript/js/libs/library_godot_display.js | 1 + 1 file changed, 1 insertion(+) diff --git a/platform/javascript/js/libs/library_godot_display.js b/platform/javascript/js/libs/library_godot_display.js index b4f1fee4ed1f..519a50f2db8a 100644 --- a/platform/javascript/js/libs/library_godot_display.js +++ b/platform/javascript/js/libs/library_godot_display.js @@ -805,6 +805,7 @@ const GodotDisplay = { canvas.style.left = 0; break; } + GodotDisplayScreen.updateSize(); if (p_fullscreen) { GodotDisplayScreen.requestFullscreen(); }