Context.js icon indicating copy to clipboard operation
Context.js copied to clipboard

Context menu on top

Open Ganbin opened this issue 8 years ago • 2 comments

Hello,

Great library thanks for the sharing.

I have a problem in my app. The context menu always appear on top of my mouse like if I am on the bottom of the page. I wonder if it is because of my html. I use it in the context of a Wakanda application inside of a grid widget.

Do you have any advise to force the context menu to open on bottom of my mouse?

Ganbin avatar Sep 28 '15 09:09 Ganbin

Finally I look up in the code and find out that you have define some code for the above : true and above : 'auto', but not for the above : false. So I have add this code to the addContext method.

I have add a pull request : Add the ability to have the above option to false. #27

else if (typeof options.above == 'boolean' && !options.above){ $dd.css({ top: e.pageY + 10, left: e.pageX - 13 }).fadeIn(options.fadeSpeed); }

Ganbin avatar Sep 28 '15 09:09 Ganbin

+1 The same problem occurs if we are on the right of the page (the first context menu appears on the right of the mouse)

Thanks for this great lib.

fabiocaccamo avatar Jan 28 '16 15:01 fabiocaccamo