You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Passing an event instead of an element to the show function should do the trick.
You can observe the difference on the demo page (https://nkappler.de/ctxmenu/)
The Button "Click this Button" passes an event and the menu sticks to the cursor, the 'button' below (which is a span element passes an element instead and the menu is attached to the elements coordinates.
Also see: https://github.com/nkappler/ctxmenu#ctxmenushow
Code example
<!-- Use This: v --><buttononclick="e => ctxmenu.show([ /* menu */ ], e)">Click this Button!</button><!-- Not This: vvvvvv --><buttononclick="e => ctxmenu.show([ /* menu */ ], e.target)">Click this Button!</button>
Sometimes the trigger button that is clicked to show the context menu is very long, in my case.
So if I click near the middle of it, the menu still appears on the top.
Wondering if there's a way to make the context menu appear near the location of the trigger click?
The text was updated successfully, but these errors were encountered: