Cesium captures all mouse and touch events which doesn't bubble up `document.activeElement`
See original GitHub issueAll mouse and touch events are capture during viewer init.
The focus events do occur when trying to change focus from a different non Cesium UI element to Cesium canvas.
Basically if a NON Cesium UI element has focus and we try to unfocus from that element by clicking on the Cesium canvas, the unfocus event cannot work correctly.
Cesium is capturing these events and thus not bubbling to allow for changing of the document.activeElement
EX: https://codesandbox.io/s/test-quasar-cesium-vue3-edjxls?file=/src/index.template.html
Oddly this doesn’t appear to be an issue with Firefox. Only Chromium browsers.
This should be consistent with all browsers. See example above in both browsers to notice the issue.
Browser: Firefox, Chrome
Operating System: windows
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (5 by maintainers)
Top GitHub Comments
Hi. I am the author of the similar issue you mentioned. As I wrote in my issue, the pr that broke the behavior was (https://github.com/CesiumGS/cesium/pull/8662)
My idea was to make this behavior configurable via the ViewerConstructorOptions - so the blurActiveElement function will not be passed for the addEventListener.
I can open such pr if you think this is an acceptable solution.
Thanks for the interest in contributing @yonzmeer. That should be fine so long as the default behavior remains the same when this option is not provided.