-
Notifications
You must be signed in to change notification settings - Fork 2k
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: check if bubble is a child of Tooltip container before removing it #4821
Conversation
This error is really very inconvenient, the people of my company will be very happy with this correction. |
Hi @gabrielrra thank you for contributing! It's awesome to see contributors like yourself helping insomnia keep going. I reviewed your PR and seems your fix is good. Just one thing that we would need to check is how this would affect the other tooltips. We are now removing the tooltip element conditionally based on _getContainer() result, which seems to pretty much guarantee the existence of the container element, but we may want to be safe, so let us double check on it. Thank you so much again for helping us improve it! |
@victorradael Thank you for adding another voice here! |
Thanks for checking it out @marckong. Glad I could help |
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.
LGTM
I tested this against the latest develop branch. This change sufficiently fixes the issue addressed at #3986 whereas the develop branch still has the bug occur. Tooltip seems to behave fine in other areas too. |
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.
LGTM!
Thought I had after reviewing and learning about tooltip component is that we could possibly turn this into a functional component. I was initially suggesting a unit test to cover this case, but it may be better to do so when we refactor this component into functional component. |
Closes #3986
There was a bug when removing a node from DOM using
removeChild
because it was trying to remove a node that was not a child.I added a check to see if the Tooltip's bubble is a child of its container.
On issue #3986 there are a little more details about the bug
changelog(Fixes): Fixed an error when swapping between gRPC and HTTP requests