contextMenu breaking FullCalendar event dragging

老子叫甜甜 提交于 2019-12-02 01:44:37

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.

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!