JavaScript弹出窗口不会弹出,因为已分配绑定



c# '/Clients/ClientSelectDataTable' 被调用并返回。

self.LookupClient = function () {
$.ajax({
type: 'POST',
url: '/Clients/ClientSelectDataTable'
}).done(function (msg) {
//grab the partial from the controller
$("#SelectClient").html('');
$("#SelectClient").html(msg);
//initialize the js
theClientPicker = new ClientSelectModel('ClientSelectDataTable', '/API/GetAllClients', AssignClient, self.CancelClientSelect, "Select");
ko.applyBindings(theClientPicker, $("#SelectClient")[0]);
$.fancybox("#SelectClient", { //launch ClientSelect widget
modal: true,
afterClose: function () {
theClientPicker.Dispose();
ko.cleanNode($("#SelectClient")[0]);
}
});
});
}

它在这里抛出一个异常 ko.applyBindings(theClientPicker, $("#SelectClient"([0](;

if (!sourceBindings) {
if (alreadyBound) {
throw Error("You cannot apply bindings multiple times to the same element.");

我可以捕获异常,但弹出窗口不起作用,因为按钮上的事件未分配。

这是一个新的客户端选择器,所以我看不出它是如何分配的。

发现问题。
这是 3.4.2 和 3.5.0 之间引入的淘汰赛中的错误或重大更改。
恢复并冻结 3.4.2 可以修复它。

有没有适当的方法来报告这种情况?

最新更新