From 2000008b474b9ccc0b7916d2c9e378f92b7635f0 Mon Sep 17 00:00:00 2001 From: Pascal Thomet Date: Sun, 22 Feb 2026 16:35:57 +0100 Subject: [PATCH] Examples: Emscripten: add tabindex=-1 to canvas in shell_minimal.html. (#9259) Without tabindex, the canvas element is not focusable in the DOM, so pongasoft/emscripten-glfw's focus/blur listeners on the canvas never fire. This means glfwSetWindowFocusCallback is never called etc. Ref: https://github.com/pongasoft/emscripten-glfw/issues/29 --- docs/CHANGELOG.txt | 3 +++ examples/libs/emscripten/shell_minimal.html | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index 4645c48a9..a6a9dfd01 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -46,6 +46,9 @@ Other Changes: - Style: border sizes are now scaled (and rounded) by ScaleAllSizes(). - Clipper: clear DisplayStart/DisplayEnd fields when Step() returns false. - Examples: + - Emscripten: added `tabindex=-1` to canvas in our shell_minimal.htm. Without it, + the canvas was not focusable in the DOM, which in turn make some backends + (e.g. pongasoft/emscripten-glfw) not receive focus loss events. (#9259) [@pthom] - WGPU: fixed undefined behaviors in example code for requesting adapter and device. (#9246, #9256) [@r-lyeh] diff --git a/examples/libs/emscripten/shell_minimal.html b/examples/libs/emscripten/shell_minimal.html index bcf626261..bcc5834a1 100644 --- a/examples/libs/emscripten/shell_minimal.html +++ b/examples/libs/emscripten/shell_minimal.html @@ -29,7 +29,7 @@ - +