mirror of
https://github.com/ocornut/imgui.git
synced 2026-05-31 14:25:49 +08:00
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
This commit is contained in:
@@ -46,6 +46,9 @@ Other Changes:
|
|||||||
- Style: border sizes are now scaled (and rounded) by ScaleAllSizes().
|
- Style: border sizes are now scaled (and rounded) by ScaleAllSizes().
|
||||||
- Clipper: clear DisplayStart/DisplayEnd fields when Step() returns false.
|
- Clipper: clear DisplayStart/DisplayEnd fields when Step() returns false.
|
||||||
- Examples:
|
- 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
|
- WGPU: fixed undefined behaviors in example code for requesting adapter
|
||||||
and device. (#9246, #9256) [@r-lyeh]
|
and device. (#9246, #9256) [@r-lyeh]
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<canvas class="emscripten" id="canvas" oncontextmenu="event.preventDefault()"></canvas>
|
<canvas class="emscripten" id="canvas" oncontextmenu="event.preventDefault()" tabindex=-1></canvas>
|
||||||
<script type='text/javascript'>
|
<script type='text/javascript'>
|
||||||
var Module = {
|
var Module = {
|
||||||
preRun: [],
|
preRun: [],
|
||||||
|
|||||||
Reference in New Issue
Block a user