fix: also emit doc close event on doc change
This commit is contained in:
parent
8a41881344
commit
987b3e23ca
1 changed files with 3 additions and 0 deletions
|
|
@ -162,6 +162,9 @@ frappe.socketio = {
|
|||
if (!frappe.socketio.last_doc
|
||||
|| (frappe.socketio.last_doc[0] != doctype || frappe.socketio.last_doc[1] != docname)) {
|
||||
frappe.socketio.socket.emit('doc_open', doctype, docname);
|
||||
|
||||
frappe.socketio.last_doc &&
|
||||
frappe.socketio.doc_close(frappe.socketio.last_doc[0], frappe.socketio.last_doc[1]);
|
||||
}
|
||||
frappe.socketio.last_doc = [doctype, docname];
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue