Skip to content

Bug: Maximum update depth exceeded #527

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

Closed
kukchanka opened this issue Jan 4, 2020 · 3 comments
Closed

Bug: Maximum update depth exceeded #527

kukchanka opened this issue Jan 4, 2020 · 3 comments

Comments

@kukchanka
Copy link

I believe there is an issue with getPosition fucntion which is used to update tooltip position when it's outside the client widnow.

There are situations with floating tooltip (e.g. when we move cursor to the bottom of the page) when it cannot be displayed, so it tries to calculate a new desiredPlace and rerenders the component, but after rerendering getPosition finds out, that a previously calculated desiredPlace doesn't allow to render tooltip inside the client window, so it calculates a new one, which turns out to be the one we started with. It starts switching back and forth and "maximum update depth exceeded" error occurs.

To demostrate this, I added a pair console.logs inside getPosition and moved the cursor over tooltiped element:
image
This is what I got in my console just right before "Maximum update depth exceeded" error:
image

@kukchanka
Copy link
Author

Created a pull-request fixing this issue: #528

@Zemelia
Copy link

Zemelia commented Aug 18, 2022

Issue still exists, it was returned after fix in #574

And in my case I see the problem, when based on position we add some extra styling to tooltip, i.e. left or top borders. So it goes into loop when trying to "updatePosition".

@pankajgandhi1010
Copy link

UpdatePosition() shows Error : Maximum update depth exceeded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants