SignalR updates not working correctly with Chrome

微笑、不失礼 提交于 2019-12-05 08:00:53

Accidentally stumbled upon the solution. After several weeks of searching I encountered this post: signalr client hub events not being triggered within a jquery .ready() method

This issue was solved by addressing this piece of JS in the view:

$(document).ready(function () {
    FetchChanges();
    notifications.client.sendUpdatedChange = function () { FetchChanges(); };
}

Moving the SignalR function mapping outside of the $(document).ready() resolved it:

$(document).ready(function () {
    FetchChanges();    
}
notifications.client.sendUpdatedChange = function () { FetchChanges(); };

I have yet to discover why this is a problem, but I'm happy to have found a solution.

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