CesiumGS / CesiumGS/cesium

Cesium captures all mouse and touch events which doesn't bubble up `document.activeElement`

Open
#10,185 7 comments 0 reactions 0 assignees View on GitHub
category - widgets type - bug type - regression
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.