Skip to content

How to force the tooltip to stay within the screen bounds on mobile devices? #447

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
SokolskyNikita opened this issue Oct 16, 2018 · 1 comment

Comments

@SokolskyNikita
Copy link

On mobile, the tooltip gets hidden if it's spawned too close to the edge of the screen. Is it possible to force the tooltip to stay within the screen bounds?

@RicardoDeity
Copy link

Hi SokolskyNikita,

I managed to do this by setting a class on the tooltip element, and add a CSS rule for this class that has: max-width: 70vw (so that it will have a max width of 70% viewport width).
Hope this helps!

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