mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-14 23:32:20 +00:00
Hand focus back to the globe canvas after a render failure
When the control that had focus is gone or cannot take it, focus went to the #cesiumContainer div, where Enter no longer finished a drawing. It now goes to the globe's canvas, which the map's keys read as the map; the canvas is focusable only until focus moves on or the globe is pressed. A control disabled while the notice was up no longer leaves focus on the page, and neither focus call scrolls.
This commit is contained in:
1 parent
771ed98e3b
commit
6976cbc941
4 files changed
+392
-65
No files matched your search
@@ -2225,9 +2225,12 @@ black globe behind controls that still respond. `installRenderFailureNotice()`
|
||||
Cesium stops its render loop, and for the canvas' `webglcontextlost`. It logs
|
||||
the error and publishes a notice to the status store, which
|
||||
`RenderFailure.vue` renders as an alert dialog that takes focus. When the
|
||||
globe draws again, focus goes back to the element that had it, or to the map
|
||||
(`#cesiumContainer`, made focusable with `tabindex="-1"`) if that element is
|
||||
gone, unless the user has moved focus since. The
|
||||
globe draws again, focus goes back to the element that had it, or, if that
|
||||
element is gone or cannot take focus, to the globe's canvas, which the map's
|
||||
keys (Enter to finish a drawing, Space to talk) read as the map. The canvas
|
||||
gets `tabindex="-1"` only until focus moves on or the globe is pressed, and a
|
||||
press leaves focus on the page, as Cesium has it. Focus the user moved
|
||||
meanwhile stays put. The
|
||||
application scene creates its viewer with `showRenderLoopErrors: false`, so
|
||||
Cesium's own "Rendering has stopped" panel, which offers no way back, no longer
|
||||
appears; `applicationViewerOptions()` and `createApplicationViewer()` keep
|
||||
|
||||
Reference in new issue
Block a user