Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Failed to execute 'elementFromPoint' on 'Document': The provided double value is non-finite #3909

Closed
alanhamlett opened this issue Oct 29, 2024 · 2 comments

Comments

@alanhamlett
Copy link
Contributor

alanhamlett commented Oct 29, 2024

The Document.elementFromPoint call here is throwing an exception. Maybe from more than one element at the point coordinates or invalid x,y coordinates?

let target = document.elementFromPoint(clientX, clientY);

User-Agent:
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Mobile Safari/537.36

Billboard.js: v3.14.0 stable

Not able to reproduce this error myself, but seeing it in my error logs.

I can submit a PR, @naver would a try/catch block work here or is there some way to validate the coordinates before passing to elementFromPoint?

@netil
Copy link
Member

netil commented Oct 30, 2024

Not able to reproduce this error myself, but seeing it in my error logs.

@alanhamlett, anyway can you provide your generation option?

I can submit a PR

please.

@alanhamlett
Copy link
Contributor Author

alanhamlett commented Oct 30, 2024

@alanhamlett, anyway can you provide your generation option?

I didn't log the data only the error when generating.

This error wasn't happening in v3.5.1 with the same generation options and same data, so we should find what's changed between 3.14.0 and 3.5.1.

@netil netil closed this as completed in 3540640 Nov 15, 2024
github-actions bot pushed a commit that referenced this issue Nov 18, 2024
## [3.14.1](3.14.0...3.14.1) (2024-11-18)

### Bug Fixes

* **point:** fix data.onclick working with sensitivity function ([587d71e](587d71e)), closes [#3912](#3912)
* **tooltip:** Hide tooltip on redraw when unexpected error ([3540640](3540640)), closes [#3909](#3909) [#3910](#3910)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants
@alanhamlett @netil and others