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

Popover placement issue when container has scroll #1851

Closed
tochoromero opened this issue May 23, 2018 · 2 comments
Closed

Popover placement issue when container has scroll #1851

tochoromero opened this issue May 23, 2018 · 2 comments

Comments

@tochoromero
Copy link
Contributor

There is a problem when you have a popover, or tooltip or dropdown on a div container that has a scrollbar. When there is a scrollbar the popover is limited to the container boundaries and cannot be positioned correctly. If the scrollbar is removed the popover works as expected.

Here is a jsfiddle demonstrating the problem: https://jsfiddle.net/tochoromero/xxd8uLmf/

Now this is a problem with popper.js, here is a reference:
floating-ui/floating-ui#248

It seems the problem is with the preventOverflow Popper setting. I guess we cannot change that property to something else by default, but we should have a way to provide our own values to workaround this issue.

Thank you.

@jacobmllr95
Copy link
Member

The popover docs are missing a proper explanation of the boundary property, but the dropdown docs have a quit good one: https://bootstrap-vue.js.org/docs/components/dropdown/#boundary-constraint

Setting the boundary option to viewport fixes the problem.
Your directive looks then like this: v-b-popover.hover.right.viewport="'I am popover content!'"

See: https://bootstrap-vue.js.org/docs/directives/popover/#directive-syntax-and-usage

@tochoromero Maybe you could create a PR to add the boundary constraint to the popover docs?

@tochoromero
Copy link
Contributor Author

the viewport option did it, thank you.
I will get some time to do the PR.

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

2 participants