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

Modal gets cut off when rendered near edge of page #180

Closed
ggongon opened this issue May 27, 2016 · 3 comments
Closed

Modal gets cut off when rendered near edge of page #180

ggongon opened this issue May 27, 2016 · 3 comments

Comments

@ggongon
Copy link

ggongon commented May 27, 2016

Summary:

If i set place="top", it renders the toolitp in the top position. if the tooltip will not fit above, it automatically renders at the bottom. Likewise, if i use place="right", it will position to the left if it is out of the current window dimensions.

But, if i choose place="top" but the content is too wide to fully display in the window, the left side will be rendered off-screen and there is no way for me to see the entire content of the tooltip.

Steps to reproduce:

  1. create a tooltip with place="top"
  2. make the tooltip width ~300px wide and position the element on the right side of the page
  3. resize your window so that the tooltip will be too wide to be rendered above the element
  4. when you mouseover the element, the right edge of the tooltip's content will not be visible

Expected behavior:

If (right_edge_of_tooltip > window.innerWidth) { place="left"; }

Additional notes:

@claydiffrient
Copy link
Contributor

@ggongon Are you sure you filed this issue against the right project? All the details seem to be about a tooltip rather than a modal.

@ggongon
Copy link
Author

ggongon commented May 27, 2016

@claydiffrient good eye. sorry about that, you're right. moving this story over to react-tooltip. thanks

@ggongon ggongon closed this as completed May 27, 2016
@maxmatthews
Copy link

@ggongon Did you ever resolve this issue or have a link to the new story? I think I'm having the same issue and just opened this: ReactTooltip/react-tooltip#130

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

3 participants