#11982·vuetify

[Feature Request] v-click-outside doesn't work with right-click or middle-click

Author: pxegerCreated Aug 2, 2020Updated Sep 17, 2026
LabelsT: featureC: VOverlayD: click-outside

Problem to solve

I want to create a custom context menu, like YouTube has on its video player for example. I have a @contextmenu handler that displays a div. I added a v-click-outside handler to close the context menu when another element is clicked. However, only a left-click works to trigger it, not right-click, middle-click, or extra buttons on the mouse. In many situations this may be desirable, but for a context menu the right-click in particular is quite important.

Proposed solution

Add another parameter to ClickOutsideBindingArgs interface to configure whether other mouse buttons should trigger the handler. Or perhaps the click event is passed to the conditional handler function which can determine whether the event should be counted.