diff --git a/src/PowderToySDLEmscripten.cpp b/src/PowderToySDLEmscripten.cpp index 37a94fb7f..056c0ea87 100644 --- a/src/PowderToySDLEmscripten.cpp +++ b/src/PowderToySDLEmscripten.cpp @@ -44,4 +44,10 @@ void MainLoop() { SetFpsLimit(ui::Engine::Ref().GetFpsLimit()); MainLoopBody(); + EM_ASM({ + let canvas = document.querySelector("canvas.emscripten"); + if (canvas) { + canvas.scrollIntoView(true); + } + }); }