sydcanem / bootstrap-contextmenu

Context menu plugin for Twitter's Bootstrap framework
http://sydcanem.com/bootstrap-contextmenu/
645 stars 193 forks source link

Is there any way to click on an item the context menu is not hidden? #59

Closed chalchis closed 10 years ago

chalchis commented 10 years ago

Is there any way to click on an item the context menu is not hidden and hidden by clicking in the body of the page?

sydcanem commented 10 years ago

Returning false in before callback should handle that.

$('#main').contextmenu({
  target: '#context-menu2',
  before: function (e, element, target) {
      e.preventDefault();
      return false;
  }
});

You still need to add some logic in before callback to check if you're clicking on an item or if you're clicking on the page body.

chalchis commented 10 years ago

thank you very much