sydcanem / bootstrap-contextmenu

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

Calling closemenu() without argument causes type error #84

Closed bzums closed 8 years ago

bzums commented 9 years ago

In the function closemenu, at the end e.stopPropagation() is called (https://github.com/sydcanem/bootstrap-contextmenu/blob/master/bootstrap-contextmenu.js#L92). This wil throw an type error when closemenu is called without the event parameter, which can happen, even the plugin itself does that.

if(e) e.stopPropagation fixes that. Other than that: nice extension :)

dzlab commented 9 years ago

I have a similar problem: when the context is visible then I right click somewhere the default context-menu is shown and I get this error Uncaught TypeError: Cannot read property 'stopPropagation' of undefined.

bzums commented 9 years ago

My fix described in the first post should work for as well.

dzlab commented 9 years ago

@bzums I think you should create a pull request

bzums commented 9 years ago

Oh I just saw there was already a push request for this fix... https://github.com/sydcanem/bootstrap-contextmenu/pull/85

KarelCemus commented 9 years ago

+1, please merge the pull request #85

ssokolow commented 9 years ago

I'm also experiencing this problem. I'm subscribing to this bug so I know when to reset the <0.3.3 specifier in my bower.json