Closed yeban closed 9 years ago
Also, escape to dismiss the menu doesn't work after this.
This is fixed by 04d42fb. Please update to the 0.3.1.
I'm sorry, the fix doesn't seem to work.
Also, package.json still states version number to be 0.3.0 which I think is why bower says:
bower bootstrap-contextmenu#0.3.1 mismatch Version declared in the json (0.3.0) is different than the resolved one (0.3.1
"I'm sorry, the fix doesn't seem to work."
Have you added data-toggle="context"
to your context elements? (not the menu).
Already fixed the versioning.
No, I activate contextmenu using JS (and not data- attributes)
$('.context').contextmenu({
target:'#context-menu'
});
I'm adding editing layer over an existing genome visualisation software. My options are a bit limited here. It would be great if you can fix this for JS only activation too.
Ok. Using data- attrs works for me. But don't you think this should work even without adding data-toggle="context"
to the context elements?
That's actually used for plugin clean-up. Some bootstrap 3 JS plugins now requires you to add data-* attributes probably for the same reason.
Ok, I didn't know. In any case, it works for me now. So I'm fine to close this issue.
I am experiencing this same issue with v0.3.2. I tried adding data-toggle="context"
to my elements, but that does not work. Here is how I am using the plugin:
$('#page-container').contextmenu({
target: '#context-menu',
scopes: '.context',
before: function(e, ctx) {
console.log("Menu is about to open.");
return true;
}
});
Any suggestions would be greatly appreciated. Thanks!
I can only ask you to make sure that data-toggle-"context"
is applied to #page-container
element. I'm also wondering, from the name of it, how big is this 'page-container' are subsequent right clicks being triggered outside the container?
The #page-container
element is the outermost container on my page and spans the entire width and height. Adding data-toggle="context"
to #page-container
will work since it essentially replaces all context menus; however, it does not produce the desired effect. What I would like to do is only replace the context menu for specific links within my page (.cs-context
and .link-with-context
), leaving the default browser context menu everywhere else.
Right click to open bootstrap contextmenu. Then right click somewhere else to open browser's default contextmenu.
Here's what we get:![screen shot 2014-11-25 at 3 06 00 pm](https://cloud.githubusercontent.com/assets/90373/5180695/a72974ba-74b4-11e4-9806-b3910a33c8d8.png)
Expected: only browsers right click menu should be visible