Vuetify: 1.2.4
Vue: 2.5.17
Browsers: Firefox 62 & Chromium 69
OS: Chakra Linux
v-app
v-content
v-container
.outside(@click='msg("outside")') // [2] Then click here, the v-menu closed though, outside's @click also be trigger
.STOP-EVENT(@click.stop="msg('v-btn to open a v-menu')")
v-menu(@click.stop="msg('this did not work')")
v-btn(slot="activator") ....... // [1] Click this, v-menu opened
v-list ........
When a v-menu
is opened, clicking outside of it should only close that v-menu
only, without triggering any other v-on:click
on the web page. (This is also the expected behavior of an Android application)
Clicking outside when a v-menu
is opened, though the v-menu
is closed successfully, but will also accidentally trigger unrelated click event listener.
This is a real world demo:
https://codepen.io/anon/pen/jemoPm?editors=1011
This is a minimalist demo:
https://codepen.io/anon/pen/WaOYEy?editors=1111
Duplicate of #1433, I don't think that should've been closed though.
Really need this feature, since in a form with a lot of buttons it's difficult to close the menu. On Android this is the default behaviour...
Since my issue was closed there is one big problem with vuetify select. When menu is open it's completely cover input field. It's cool but in UX manner not usable since it covers arrow which is intuitive way to close without selecting item. Best way to get out of this would be option to render menu under input not cover it.
Material design has great way to handle this. First menu is under input, second it has first value emtpy for unselect https://material-components.github.io/material-components-web-catalog/#/component/select
That also doesn't follow their own guidelines. You can use menu-props="offsetY"
to prevent the overlap.
Had a shot at this a while ago, whoever tries next should explore an invisible overlay instead of hacking up click-outside.
Most helpful comment
Really need this feature, since in a form with a lot of buttons it's difficult to close the menu. On Android this is the default behaviour...