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

The pointer interaction shouldn’t synchronously dispatch an event on initial render #2160

Open
mbostock opened this issue Sep 1, 2024 · 0 comments
Labels
bug Something isn’t working

Comments

@mbostock
Copy link
Member

mbostock commented Sep 1, 2024

The pointer interaction calls render(null) on the initial render, which I believe calls through to context.dispatchValue, resulting in a figure.dispatchEvent before the generated figure has even been returned. There’s no need to dispatch an event during the initial render, since it’s not possible for external listeners to be registered yet. Avoiding this call would address some compatibility issues in non-browser environments.

Ref. #2158 (reply in thread)

@mbostock mbostock added the bug Something isn’t working label Sep 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn’t working
Projects
None yet
Development

No branches or pull requests

1 participant