question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Please provide an example of appending a `.dropdown-menu` to `body` (to allow overflowing a scrollable parent).

See original GitHub issue

Documentation issue

  • Reporting a typo
  • Reporting a documentation bug
  • Documentation improvement
  • Documentation feedback

Is there a specific documentation page you are reporting?

https://bootstrap-vue.org/docs/components/dropdown#advanced-popperjs-configuration

Additional context or description

I’ve been trying to append the .dropdown-menu to body element to allow it to overflow a parent with overflow:hidden without any success. I tried to use both boundary and :popper-opts.

In boundary I tried to pass

  • 'window',
  • 'viewport'
  • a body reference: computed: { body: () => document.body }.
  • also tried computed: { appRef: () => document.querySelector('#app') }.

I also tried to peak into source code to see what popper-opts expects (as Popper.js documentation is too cryptic for me), but wasn’t able to pinpoint it into the bootstrap-vue package.

Is there an example anywhere of how this could be achieved?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

8reactions
cdauthcommented, Mar 12, 2021

Another solution that I found that seems to work much better is to set :popper-opts="{ positionFixed: true }" on the dropdown element.

2reactions
cdauthcommented, Jun 19, 2021

I think it would be nice for this to be fixed, either by introducing a positioning mechanism that works universally or by at least documenting a workaround. Dropdown positioning is quite painful at the moment.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Allow a drop-down element to overflow a container that has ...
Its content container controls the size and overflow. ... does not move the dropdown options when the parent has been scrolled horizontally.
Read more >
CSS Drop Down Menu hidden behind horizontal scrollbar
It's the overflow:auto that stops the menu showing outside of that context. (BTW There is no property called overflow-y:none). The only way you ......
Read more >
CSS overflow-x property - W3Schools
The overflow-x property specifies whether to clip the content, add a scroll bar, or display overflow content of a block-level element, when it...
Read more >
Prototype scrolling with overflow behavior - Figma Help Center
Users on any team or plan can use scrolling overflow in their prototypes. ... Vertical scrolling allows users to swipe or scroll up...
Read more >
How to create a table with fixed header and scrollable body
1. Blaze UI Cards Header Body and Footer · 2. How to Click on header to add another header in jQuery ? ·...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found