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.

"v-menu" appears as fixed if parent component is inside a scrolling container

See original GitHub issue

I did my best to see if this has already been reported, but could find anything. I wouldn’t really call this an issue, I am more curious what your thoughts are on adding a prop to v-menu to avoid mounting to the root of the app, that way a menu can exist inside of a scrolling container also.

Could possible check for a prop in the mount method: (https://github.com/vuetifyjs/vuetify/blob/a79b018c557789b2cd4cf89ac3badbca40abd5fe/src/components/menus/Menu.js#L138)

Steps to reproduce

Put a <v-menu> inside of a component that has a overflow: auto or overflow-y: scroll

Versions

0.12.7

What is expected ?

The menu should “stick” to the activator that opens the menu, e.g. Dropdown, Select.

What is actually happening ?

If you place any component that has a <v-menu> inside of a parent component that is scrollable, the menu appears to be fixed and becomes “disconnected” from the activator

Reproduction Link

Click the “Dropdown” button and then start scrolling up or down. https://codepen.io/anon/pen/BZWOry

Thanks!!!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:16 (10 by maintainers)

github_iconTop GitHub Comments

5reactions
nekosaurcommented, Feb 20, 2018
  1. Use attach prop on v-menu

  2. In the future, please create new issues instead of commenting on closed ones, or join our chat at https://chat.vuetifyjs.com to get help.

4reactions
codewpcommented, Jun 22, 2018

@nekosaur

I used attach prop for menu but it can not calculate right position for menu when menu is inside of v-bottom-nav

It opens menu under bottom-nav!

https://codepen.io/anon/pen/yEjwMr

Please let me know how can I solve this problem?

Read more comments on GitHub >

github_iconTop Results From Across the Web

scroll - Solving Vuetify "v-menu" appears as fixed if parent ...
After 2 hours of debugging I finally gave up on using the "attach" prop and decided to simply track the scrolling position of...
Read more >
overflow - CSS: Cascading Style Sheets - MDN Web Docs
The overflow CSS shorthand property sets the desired behavior for an element's overflow — i.e. when an element's content is too big to...
Read more >
Prototype scrolling with overflow behavior - Figma Help Center
Check the box next to Fix position when scrolling. Figma will move these objects above your other layers so that they are in...
Read more >
CSS: fixed menus - W3C
But, it stays fixed when you scroll the page. ... determine where the DIV is displayed, in this case: 50% down from the...
Read more >
Position - Bootstrap
Be sure you understand the ramifications of fixed position in your project; you may need to add aditional CSS. Copy. <div class="fixed-top">...
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