contextMenu breaking FullCalendar event dragging

后端 未结 2 1310
一个人的身影
一个人的身影 2021-01-21 11:04

So I recently added a context menu to the events in my FullCalendar using jQuery contextMenu (http://abeautifulsite.net/blog/2008/09/jquery-context-menu-plugin/). It works beaut

相关标签:
2条回答
  • 2021-01-21 11:34

    For those who don't want to change plugins, to fix the issue with the context menu mangling the dragability I modified jquery.contextMenu.js

    From:

    $(this).mousedown( function(e) {
                    var evt = e;
                    evt.stopPropagation();
                    $(this).mouseup( function(e) {
                        e.stopPropagation();
                        var srcElement = $(this);
                        $(this).unbind('mouseup');
                                                if (evt.button == 2) {
    

    to

    $(this).mousedown( function(e) {
                    var evt = e;
                    evt.stopPropagation();
                    $(this).mouseup( function(e) {
                        if (evt.button == 2) {
                            e.stopPropagation();
                            var srcElement = $(this);
                            $(this).unbind('mouseup');
    

    This stops the context menu plugin from doing anything on a left click, only on right click.

    0 讨论(0)
  • 2021-01-21 11:38

    Well, since it looks like this isn't gonna get answered my solution was to switch to a different context menu plugin (http://www.trendskitchens.co.nz/jquery/contextmenu/) which was very similar and didn't cause any problems with Full Calendar. It's not a fix for whatever problem stops this plugin from working with Full Calendar, but it is a fix to get my program running properly.

    0 讨论(0)
提交回复
热议问题