Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use of clickaway removes ability to open a context menu with a left click #14

robjbrain opened this issue Dec 13, 2018 · 3 comments


Copy link

@robjbrain robjbrain commented Dec 13, 2018


Obviously the main purpose of this package is to allow for a right click to open a contextmenu.

However it should in theory work for left clicks as well.

I thought this would be a simple case of replacing @contextmenu with @click.

However I found that clickaway is detecting the click and closing the context menu instantly.

Removing v-on-clickaway allows for a left click context menu but obviously the context menu just stays open indefinitely.

I also tested the old branch that used @blur and a left click was possible. So removing this ability may have been an unintentional side effect of using clickaway.

I haven't been able to figure out a way to fix this yet.


This comment has been minimized.

Copy link

@Romick2005 Romick2005 commented Dec 14, 2018

Hi I think all you need to do is just to play with .stop .prevent click event modifiers.
I have updated the code a little bit to feet my needs but the main code logic should be the same.
You can check it here.
So basically it is context menu and you can specify wrapper container when it will appear and also provide left or right mouse click events to capture.
In my example just for demo it should show context menu on both left and right mouse click.
Hope this helps.


This comment has been minimized.

Copy link

@rawilk rawilk commented Mar 31, 2019

@robjbrain You should be able to use the stop modifier as suggested by @Romick2005 on the left click event to fix that issue. I've tested it with and without modifiers on the @click event and it worked without issue for me, so there must be something in your code that is causing it to happen.

Sorry for not responding sooner, I've been busy with other projects and haven't had a chance to maintain this one until now.

@rawilk rawilk closed this Mar 31, 2019

This comment has been minimized.

Copy link

@rawilk rawilk commented Mar 31, 2019

I've also added some information about left clicks to the README for others who may have similar issues:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
3 participants
You can’t perform that action at this time.