ngContextMenu icon indicating copy to clipboard operation
ngContextMenu copied to clipboard

is it possible to change to left click instead of right click?

Open liadlivnat opened this issue 8 years ago • 9 comments

is it possible to change to left click instead of right click?

liadlivnat avatar Mar 03 '16 13:03 liadlivnat

Yes it is, but it's somewhat experimental. Please close this ticket if everything works out :+1:

Wildhoney avatar Mar 03 '16 15:03 Wildhoney

Wow, thanks for the fast response,

well it worked, but it cause different issue, when i click inside the element, it perform a click on different element and open the menu again, any idea why?

I'm attaching an image to demonstrate.

animation

liadlivnat avatar Mar 03 '16 16:03 liadlivnat

Hmm.

On your popup element, could you trap the onClick event and invoke event.stopPropagation? It seems as though the event is bubbling up to the "DNS" container.

Wildhoney avatar Mar 03 '16 16:03 Wildhoney

works like a magic, thanks so much!

liadlivnat avatar Mar 03 '16 16:03 liadlivnat

No problem :+1:

Wildhoney avatar Mar 03 '16 16:03 Wildhoney

@Wildhoney any chance you know how to handle the case that the modal will be sticked and not scrolled with the page (i guess it's related to the position fixed) i'm attaching an image. animation

liadlivnat avatar Mar 06 '16 14:03 liadlivnat

Try position: fixed on the context menu's container :+1:

Wildhoney avatar Mar 06 '16 14:03 Wildhoney

it's already fixed, your code add's the position fixed to it...

liadlivnat avatar Mar 06 '16 15:03 liadlivnat

Ah bugger — yep. position: absolute? We use fixed because that mimics the browser's behaviour for context menus.

Wildhoney avatar Mar 06 '16 16:03 Wildhoney