Cesium captures all mouse and touch events which doesn't bubble up `document.activeElement`
- Dominant language
- JavaScript
- Stars
- 15.7k
- Forks
- 3.9k
- Avg merge
- 4d 6h
- Merged PRs (30d)
- 34
Description
All 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
Contributor guide
Research direction
Start with viewer initialization and the mouse and touch event handling around the Cesium canvas. Reproduce the focus change using the linked CodeSandbox, then compare Chromium and Firefox behavior when a non-Cesium element is focused. Done means clicking the canvas consistently allows the other element to lose focus across both browsers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100