Templarian / ui.bootstrap.contextMenu

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

Context menu not working with element without value #46

Closed Jarkyy closed 8 years ago

Jarkyy commented 8 years ago

I have data grid with some empty cells and I need to be able to open context menu for those cells too. Problem is that context menu works fine for cells with some value, but not for those without value.

This works: <div><p context-menu="taskContextMenu(6,2,'true','false')" title="VS">VS</p></div>

Not working: <div><p context-menu="taskContextMenu(6,2,'true','false')"></p></div>

Jarkyy commented 8 years ago

Solved the issue with non-breaking space.

josetaira commented 8 years ago

When the element the context-menu is attached to has no "size" (such as when there's no text inside), there's really no way to "click" that element. If you look at it under Inspect Element, it normally wont show at all. Adding a non-breaking space makes the containing div/p have a size which you can click/right-click onto.