fullcalendar.js: Uncaught TypeError: Cannot read property 'ownerDocument' of undefined

fullcalendar.js: Uncaught TypeError: Cannot read property 'ownerDocument' of undefined

我已经使用 fullcalendar.js 和 scheduler.js 插件在客户的 ASP.NET WebForms 网站上实施了一个调度程序。它在我的本地机器上工作得很好,但是当我将它部署到另一台机器上时——无论是客户的还是我的——它都会抛出一个通用的 "Cannot read property 'ownerDocument' of undefined" 错误。

这是堆栈跟踪:

getScrollParent (fullcalendar.js:302)
queryBoundingRect (fullcalendar.js:2419)
build (fullcalendar.js:2236)
d.internalApiVersion.r.prepareHits (scheduler.min.js:8)
computeCoords (fullcalendar.js:3066)
handleInteractionStart (fullcalendar.js:3025)
startInteraction (fullcalendar.js:2520)
dayMousedown (fullcalendar.js:3656)
(anonymous function) (fullcalendar.js:3597)
dispatch (jquery.min.js:3)
q.handle (jquery.min.js:3)

这是抛出错误的行:

return position === 'fixed' || !scrollParent.length ? $(el[0].ownerDocument || document) : scrollParent;

到目前为止我所做的事情:

  1. 检查两个系统上的文件 - 所有文件完全相同。
  2. 将 fullcalendar 更新到版本 3(通过用新文件替换 2.9.1 文件)
  3. 运行它在 IISExpress 和 IIS 上
  4. 使用完整日历的非缩小版本。

结果就是上面的错误。

这是我要处理的事件:

            select: function(start, end, jsEvent, view, resource) {

            $.ajax({
                url: '/WebServices/WineLocationTaskService.asmx/GetUsersByWineLocation',
                type: 'POST',
                contentType: 'application/json; charset=utf-8',
                datatype: 'json',
                data: JSON.stringify({
                    locationID: '<%= App.Context.Data.Location.ParentLocation %>'
                }),

                success: function(data) {

                    var json = $.parseJSON(data.d);
                    var users = [];
                    $.each(json, function(i, field) {

                        //var option = $('<option value="' + field.id + '">' + field.name + '</option>');
                        //$('#users').append(option);
                        users.push({
                            id: field.id,
                            text: field.name
                        });
                    });

                    $('#users').select2({ data: users, multiple: true, width: "100%" });
                },
                error: function() {
                    alert('there was an error while fetching events!');
                }
            });
            $("#startDate").text(start.format());
            $("#endDate").text(end.format());
            $("#resourceID").val(resource.id);

            $("#dialog2").dialog('open');
        },

在后端,我使用代码 200 的结果调用 ASMX 服务 - 我可以看到响应数据有效 json。

这可能是不同 IIS 模块处理程序设置的结果吗?我在工作站点和非工作站点上使用完全相同的 web.confing。

body .fc {
  overflow:auto;
}

添加这个 发现于 github