-
Notifications
You must be signed in to change notification settings - Fork 19.6k
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
fix(tooltip): fix potential NPE when the parent node of the tooltip element doesn't exist #19265
Conversation
…x potential NPE when its parent node doesn't exists. (#19248)
Thanks for your contribution! The pull request is marked to be |
The changes brought by this PR can be previewed at: https://echarts.apache.org/examples/editor?version=PR-19265@0d29cd8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your comment. I've noticed the compatibility of IE, it's a pity. Most of the users should have been not able to open the IE browser or will be redirected to Microsoft Edge in their Windows 10 or 11. I would expect we can drop the support gradually. But for now, as per your concern, I decided to reserve the support for IE 11. |
I also agree that support for Internet Explorer should be drop gradually, but I am uncertain as to which version we should ensure browser compatibility with. What are your thoughts? |
Maybe the best time to drop support for IE and other old-fashion browsers is the release of a main version of ECharts, for example, the ECharts 6.0. We can continue to discuss on this problem by that time. |
Congratulations! Your PR has been merged. Thanks for your contribution! 👍 |
Brief Information
This pull request is in the type of:
What does this PR do?
Fixed issues
Details
Before: What was the problem?
As the tooltip
dispose
is usingparentNode.removeChild
to remove the element itself and there is no non-null check, an NPE issue may occur.After: How does it behave after the fixing?
Switch to use the element's ownremove
API.Add a non-null check before calling
parentNode.removeChild
Document Info
One of the following should be checked.
Misc
ZRender Changes
Related test cases or examples to use the new APIs
N.A.
Others
Merging options
Other information