Commit bfe97358 authored by Julia Radzhabova's avatar Julia Radzhabova

Lost focus from chat window when getting changes from other users.

parent 4cc07218
......@@ -169,6 +169,8 @@ define([
if (!/area_id/.test(e.target.id)) {
if (/msg-reply/.test(e.target.className))
me.dontCloseDummyComment = true;
else if (/chat-msg-text/.test(e.target.id))
me.dontCloseChat = true;
}
});
......@@ -181,6 +183,8 @@ define([
me.api.asc_enableKeyEvents(true);
if (/msg-reply/.test(e.target.className))
me.dontCloseDummyComment = false;
else if (/chat-msg-text/.test(e.target.id))
me.dontCloseChat = false;
}
}
}).on('dragover', function(e) {
......@@ -592,7 +596,7 @@ define([
if ( type == Asc.c_oAscAsyncActionType.BlockInteraction &&
(!this.getApplication().getController('LeftMenu').dlgSearch || !this.getApplication().getController('LeftMenu').dlgSearch.isVisible()) &&
!( id == Asc.c_oAscAsyncAction['ApplyChanges'] && this.dontCloseDummyComment ) ) {
!( id == Asc.c_oAscAsyncAction['ApplyChanges'] && (this.dontCloseDummyComment || this.dontCloseChat)) ) {
// this.onEditComplete(this.loadMask); //если делать фокус, то при принятии чужих изменений, заканчивается свой композитный ввод
this.api.asc_enableKeyEvents(true);
}
......
......@@ -159,6 +159,8 @@ define([
if (!/area_id/.test(e.target.id)) {
if (/msg-reply/.test(e.target.className))
me.dontCloseDummyComment = true;
else if (/chat-msg-text/.test(e.target.id))
me.dontCloseChat = true;
}
});
......@@ -171,6 +173,8 @@ define([
me.api.asc_enableKeyEvents(true);
if (/msg-reply/.test(e.target.className))
me.dontCloseDummyComment = false;
else if (/chat-msg-text/.test(e.target.id))
me.dontCloseChat = false;
}
}
}).on('dragover', function(e) {
......@@ -404,7 +408,7 @@ define([
if ((id==Asc.c_oAscAsyncAction['Save'] || id==Asc.c_oAscAsyncAction['ForceSaveButton']) && (!this._state.fastCoauth || this._state.usersCount<2))
this.synchronizeChanges();
if (type == Asc.c_oAscAsyncActionType.BlockInteraction && !((id == Asc.c_oAscAsyncAction['LoadDocumentFonts'] || id == Asc.c_oAscAsyncAction['ApplyChanges']) && this.dontCloseDummyComment )) {
if (type == Asc.c_oAscAsyncActionType.BlockInteraction && !((id == Asc.c_oAscAsyncAction['LoadDocumentFonts'] || id == Asc.c_oAscAsyncAction['ApplyChanges']) && (this.dontCloseDummyComment || this.dontCloseChat))) {
this.onEditComplete(this.loadMask);
this.api.asc_enableKeyEvents(true);
}
......
......@@ -167,6 +167,8 @@ define([
if (e && e.target && !/area_id/.test(e.target.id)) {
if (/msg-reply/.test(e.target.className))
me.dontCloseDummyComment = true;
else if (/chat-msg-text/.test(e.target.id))
me.dontCloseChat = true;
}
});
......@@ -181,6 +183,8 @@ define([
me.api.asc_enableKeyEvents(true);
if (/msg-reply/.test(e.target.className))
me.dontCloseDummyComment = false;
else if (/chat-msg-text/.test(e.target.id))
me.dontCloseChat = false;
}
}
}).on('dragover', function(e) {
......@@ -426,12 +430,12 @@ define([
this.setLongActionView(action);
} else {
if (this.loadMask) {
if (this.loadMask.isVisible() && !this.dontCloseDummyComment)
if (this.loadMask.isVisible() && !this.dontCloseDummyComment && !this.dontCloseChat)
this.api.asc_enableKeyEvents(true);
this.loadMask.hide();
}
if (type == Asc.c_oAscAsyncActionType.BlockInteraction && !( (id == Asc.c_oAscAsyncAction['LoadDocumentFonts'] || id == Asc.c_oAscAsyncAction['ApplyChanges']) && this.dontCloseDummyComment ))
if (type == Asc.c_oAscAsyncActionType.BlockInteraction && !( (id == Asc.c_oAscAsyncAction['LoadDocumentFonts'] || id == Asc.c_oAscAsyncAction['ApplyChanges']) && (this.dontCloseDummyComment || this.dontCloseChat) ))
this.onEditComplete(this.loadMask, {restorefocus:true});
}
},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment