Conversation
Abdkhan14
commented
Dec 18, 2025
- Echarts doesn't provide a callback for this usecase so we use coordinate mapping manually
- Also, this is explore attribute breakdowns behaviour. Added inside/outside selected region click handlers to decouple the generic selection hook from this logic.
|
|
||
| const handleClickAnywhere = (event: MouseEvent) => { | ||
| const handleInsideSelectionClick = (event: MouseEvent) => { | ||
| event.preventDefault(); |
There was a problem hiding this comment.
Bug: Unconditional preventDefault blocks all page clicks during selection
The click handler is now attached to document.body with capture phase, but event.preventDefault() is called unconditionally at the start of the handler. This means when a chart selection is active, any click anywhere on the page (navigation links, buttons, form elements, etc.) will have its default behavior prevented, potentially breaking page interactivity. The preventDefault() call was appropriate when the handler was attached only to the chart DOM element (previous implementation), but with the scope expanded to document.body, it now affects unrelated page elements.
Additional Locations (1)
There was a problem hiding this comment.
Doesn't seem to be reproducible
There was a problem hiding this comment.
@Abdkhan14 I'm able to repro this, and it seems to break all links afterwards 👀
Screen.Recording.2025-12-18.at.13.43.13.mov
There was a problem hiding this comment.
As long as their is a selection present, i can't interact with the page 🤔
There was a problem hiding this comment.
Ahh right, only when a selection is made. I'll remove the preventDefault
… first chart selection
… first box draw (#105249) <img width="1120" height="481" alt="Screenshot 2025-12-18 at 12 33 51 PM" src="https://github.com/user-attachments/assets/41a0a305-0b8f-4a5a-a094-cd15829e9983" /> Co-authored-by: Abdullah Khan <[email protected]>