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

bug: Popover can go off screen #3047

Closed
AgDude opened this issue Feb 6, 2015 · 3 comments
Closed

bug: Popover can go off screen #3047

AgDude opened this issue Feb 6, 2015 · 3 comments
Milestone

Comments

@AgDude
Copy link

AgDude commented Feb 6, 2015

Type: bug

Platform: all

With a large popover on a small screen, the popover may extend off the top of the screen.

The old functionality was that the popover always went down, so the scroll area could be extended to accommodate the popover.
Changes made to the popover in 5d06c4a cause the popover to pop up if it would extend off the bottom of the screen. If the popover is large enough that it also extends off the top of the screen, there is no way to scroll to it.

The default functionality is good in most cases, but there should be an option on the popover to specify "up" or "down". An option to automatically extend the scroll area if needed would be nice also.

@ajoslin
Copy link
Contributor

ajoslin commented Feb 27, 2015

OK cool, this makes sense. @AgDude what if we just made the popover only pop upwards if there's more room above than below?

So if the popover is 300px tall, there's 200px available below, and there's 100px available above, it will just stay with popping below.

@AgDude
Copy link
Author

AgDude commented Feb 27, 2015

@ajoslin, I don't think that proposal will fully solve the problem. Let's say the popover is 350 px, there is 200px below, and 250px above. The popup would go up, and still extend off the screen and be unreachable,

What if you check that the popover will actually fit, then default to down?

Logic something like this:

What is the height of the popover (call it height)
Hoe much space is below the popover point (call it footroom)
if height > foot_room
how much space it above the popover point (call it headroom
if headroom > height: go UP
else go Down

@ajoslin
Copy link
Contributor

ajoslin commented Feb 27, 2015

That makes sense. We'll only pop up if there's actually room up.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants