Templarian / ui.bootstrap.contextMenu

AngularJS Bootstrap UI Context Menu
MIT License
259 stars 127 forks source link

Can I use system-context-menu while clicking some special target? #70

Closed leviathangirl closed 8 years ago

leviathangirl commented 8 years ago

I use ui.bootstrap.contextMenu for a html.

While I'm click something special, I want use system-context-menu instead of ui.bootstrap.contextMenu.

I knew that I can identify which target to use different contextMenu by using $event.target.

I tried contextMenuOptions return null or false, but it return to me a blank contextMenu, not `system-context-menu.

snap261

What params should be used for switch between system-context-menu and ui.bootstrap.contextMenu?

josetaira commented 8 years ago

There's currently no way to specify when to turn it off. However, you can try adding something like:

event.stopPropagation();
event.preventDefault();

to the element containing system-context-menu. Just make sure that the event already has reached system-context-menu before you stop propagation. If you provide a plunkr I might be able to help a bit more.

This is really outside the scope of this project, so I'll be closing this unless there's a good reason not to.