提交 9ca55067 编写于 作者: NoSubject's avatar NoSubject

关闭页面时beforeunload执行两次的问题

上级 b5ab8330
......@@ -1332,8 +1332,8 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class({
}
if (!this.options.readonly) {
if (this.businessData.work && this.businessData.work.id) {
if (!this.isSendBeacon) {
if (this.app.inBrowser && navigator.sendBeacon) {
var obj = this.workAction.action.actions["checkDraft"];
var url = this.workAction.action.address + obj.uri;
url = url.replace("{id}", this.businessData.work.id);
......@@ -1348,6 +1348,8 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class({
}
}.bind(this), null, false);
}
this.isSendBeacon = true;
}
}
} else {
this.app.refreshTaskCenter();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册