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

Tooltip defaults to center of screen if surpasses displayInset on the right side #82

Closed
danielfx90 opened this issue May 27, 2020 · 4 comments · Fixed by #114
Closed

Comments

@danielfx90
Copy link

danielfx90 commented May 27, 2020

Situation

Whenever the tooltip reaches the right limit of the displayInset container, it defaults to be positioned at the center of the screen, breaking the component.

Expected

Expand to the left of the screen as it does to the right side when the left limit is reached.

Found

It is rendered at the center of the screen.

Package Version

1.1.7

Code

<Tooltip
  isVisible={tooltipVisible}
  content={<Text>{tooltipText}</Text>}
  placement="top"
  onClose={() => setTooltipVisible(false)}
>
  {children}
</Tooltip>

Screenshots

When tooltip does not reach the right limit of displayInset

Screenshot_20200527-065952

When tooltip reaches the right limit and defaults to center

Screenshot_20200527-065912

App where the package is used

Wibson

@jasongaare
Copy link
Owner

Hello! This might be related to: #78

I would love to find a resolution for this - unfortunately I haven’t had much time lately to work on this project

@davidfant
Copy link

@danielfx90 did you end up solving this?

@danielfx90
Copy link
Author

danielfx90 commented Aug 18, 2020

@davidfant Not at a library level. We changed a bit our margins to make the tooltip fit and release the app update.

@taneba
Copy link

taneba commented Dec 22, 2020

In my case, setting isVisible false while react-navigation is transitioning solved the same behavior.

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 a pull request may close this issue.

4 participants