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

better fix for Maximum call stack size exceeded #68

Merged
merged 1 commit into from
Jan 10, 2016

Conversation

enjalot
Copy link
Contributor

@enjalot enjalot commented Jan 9, 2016

I've implemented a more thorough handling for tooltips going outside of the window. The problem occurs in both float or solid mode when updating the place of the tooltip will also put it outside the window, this can happen with items (like icons) placed in a corner of the screen.

This code will only update the place of the tooltip if updating it will not put the tooltip outside in anyway. In most cases this should still fix the positioning, but for the rare cases that it doesnt it will simply allow the tooltip to go outside of the window rather than erroring with Maximum call stack size exceeded.

I've re-enabled the functionality for solid since this should always work.

return y + _offsetEffectY + yPosition
}

var windoWidth = window.innerWidth
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@enjalot Little typo :)

Edit: Ouh it was there before, so maybe it was intentional ;P

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hah i didn't notice. nice way to save a character ;)

wwayne added a commit that referenced this pull request Jan 10, 2016
better fix for Maximum call stack size exceeded
@wwayne wwayne merged commit 3d362af into ReactTooltip:master Jan 10, 2016
@wwayne
Copy link
Collaborator

wwayne commented Jan 10, 2016

Thanks 👍
Gonna make some small change(code style, es6...) before update npm

@wwayne
Copy link
Collaborator

wwayne commented Jan 10, 2016

@enjalot NPM published, v1.0.0

@enjalot
Copy link
Contributor Author

enjalot commented Jan 10, 2016

awesome! 💯 thanks so much.

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

Successfully merging this pull request may close these issues.

3 participants