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 expands outside of viewport #2671

Closed
david-kerwick opened this issue Jan 16, 2017 · 3 comments · Fixed by #2678
Closed

Tooltip expands outside of viewport #2671

david-kerwick opened this issue Jan 16, 2017 · 3 comments · Fixed by #2678

Comments

@david-kerwick
Copy link

Bug, feature request, or proposal:

Feature

What is the expected behavior?

Tooltip should wrap or move to another 'side'
Something like what bootstrap seems to do
https://codepen.io/anon/pen/MJjqaE

What is the current behavior?

screen shot 2017-01-16 at 13 47 04

What are the steps to reproduce?

https://plnkr.co/edit/YLGWc42i4AGQXh9o4USg?p=preview
Setting to right or left shows it more dramatically

What is the use-case or motivation for changing an existing behavior?

If the tooltip is on an item that's close to the edge of the viewport it's easy for the content to flow off screen

Is there anything else we should know?

I think it's been mentioned in a comment before but I couldn't find an issue on it
#1830 (review)

crisbeto added a commit to crisbeto/material2 that referenced this issue Jan 16, 2017
Adds a `max-width` to the tooltip, in order to wrap longer lines of text. Note that the value is arbitrary since there was nothing about it in the spec.

Fixes angular#2671.
mmalerba pushed a commit that referenced this issue Jan 18, 2017
Adds a `max-width` to the tooltip, in order to wrap longer lines of text. Note that the value is arbitrary since there was nothing about it in the spec.

Fixes #2671.
@david-kerwick
Copy link
Author

Should I open an new issue about the tooltip going outside the viewport. I can't find another issue on it? The fix wraps the long lines now but it still goes off screen.

There's a screenshot here
#2678 (comment)

kara pushed a commit to kara/material2 that referenced this issue Jan 20, 2017
Adds a `max-width` to the tooltip, in order to wrap longer lines of text. Note that the value is arbitrary since there was nothing about it in the spec.

Fixes angular#2671.
@kpaxton
Copy link

kpaxton commented Aug 16, 2018

This still is an issue in the latest versions (6+). Maximum width does not resolve this issue. This should behave similar to the MatMenu where when close to an edge of the browser window will reposition itself to stay on screen.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants