As shown in the attached picture, the v menu position is in the wrong position when using the scale CSS property.
Corresponding codepen: https://codepen.io/satishvarada/pen/YzjGNVZ
Similar problems will also occur when using v-autocomplete components.
new Vue({ el: '#app', vuetify: new Vuetify(), data: () => ({ items: [{ title: 'Click Me' }, { title: 'Click Me' }, { title: 'Click Me' }, { title: 'Click Me 2' }, ], }), })
html { zoom: 40% }
<link href="https://unpkg.com/[email protected]/dist/vuetify.min.css" rel="stylesheet"/> <script src="https://unpkg.com/babel-polyfill/dist/polyfill.min.js"></script> <script src="https://unpkg.com/[email protected]/dist/vue.js"></script> <script src="https://unpkg.com/[email protected]/dist/vuetify.min.js"></script> <div id="app"> <v-app id="inspire"> <div class="text-center"> <v-menu offset-y> <template v-slot:activator="{ on, attrs }"> <v-btn color="primary" dark v-bind="attrs" v-on="on" > Dropdown </v-btn> </template> <v-list> <v-list-item v-for="(item, index) in items" :key="index"> <v-list-item-title>{{ item.title }}</v-list-item-title> </v-list-item> </v-list> </v-menu> </div> </v-app> </div>
One way is to use the
left
attribute, so the menu will always be on the left.edit-
Another approach is to attach the menu to its parent element using the attach prop, so the component knows which DOM element it should detach to.
This is a demo with two props -
1. With scaling properties-
2. No scaling attribute-