Vuetify: [Feature Request] [VMenu] Ability to open the menu with a right-click event

Created on 4 Oct 2019  路  2Comments  路  Source: vuetifyjs/vuetify

Problem to solve

Currently the VMenu component can be opened either with a click-event (default) or on hover (configurable via a prop). A common use case (especially for large or "enterprise-class" applications) is to have a custom context menu which is invoked via a right-click. As things stand today, VMenu does not handle this out of the box.

Proposed solution

Create a new prop to VMenu called open-on-right-click or open-on-contextmenu (with a default value of false) which would behave the same as open-on-hover and open-on-click.

This would also involve updating the ClickOutside directive to handle both the onclick as well as the oncontextmenu events.

feature maybe

Most helpful comment

also can easily be done by
@contextmenu.prevent="on.click" in activator slot, or @contextmenu.prevent="vmodelProp = true" on a non-activator slot button.
eg: https://codepen.io/majesticpotatoe-the-bashful/pen/MWWWWjR

All 2 comments

also can easily be done by
@contextmenu.prevent="on.click" in activator slot, or @contextmenu.prevent="vmodelProp = true" on a non-activator slot button.
eg: https://codepen.io/majesticpotatoe-the-bashful/pen/MWWWWjR

ah that is great to know.
there is still the issue of the ClickOutside directive not having support for the oncontextmenu event. Let me know if I should open a bug for that - https://codepen.io/morficus/pen/QWWWWdZ

Was this page helpful?
0 / 5 - 0 ratings