Fix Bug 44918

This commit is contained in:
Julia Radzhabova 2020-04-15 15:17:51 +03:00
parent 6573cc7a84
commit 0a58bc3fa2
6 changed files with 21 additions and 21 deletions

View file

@ -7,7 +7,7 @@
</div> </div>
<div id="chat-options" class="layout-item"> <div id="chat-options" class="layout-item">
<div id="chat-options-ct"> <div id="chat-options-ct">
<textarea id="chat-msg-text" class="user-select" maxlength="<%=maxMsgLength%>"></textarea> <textarea id="chat-msg-text" class="user-select textarea-control" maxlength="<%=maxMsgLength%>"></textarea>
<button id="chat-msg-btn-add" class="btn normal dlg-btn primary"><%=scope.textSend%></button> <button id="chat-msg-btn-add" class="btn normal dlg-btn primary"><%=scope.textSend%></button>
</div> </div>
</div> </div>

View file

@ -14,7 +14,7 @@
<div class="user-message" data-can-copy="true"><%=scope.pickLink(comment)%></div> <div class="user-message" data-can-copy="true"><%=scope.pickLink(comment)%></div>
<% } else { %> <% } else { %>
<div class="inner-edit-ct"> <div class="inner-edit-ct">
<textarea class="msg-reply user-select" maxlength="maxCommLength"><%=comment%></textarea> <textarea class="msg-reply user-select textarea-control" maxlength="maxCommLength"><%=comment%></textarea>
<button class="btn normal dlg-btn primary btn-inner-edit" id="id-comments-change">textEdit</button> <button class="btn normal dlg-btn primary btn-inner-edit" id="id-comments-change">textEdit</button>
<button class="btn normal dlg-btn btn-inner-close">textCancel</button> <button class="btn normal dlg-btn btn-inner-close">textCancel</button>
</div> </div>
@ -42,7 +42,7 @@
<%}%> <%}%>
<% } else { %> <% } else { %>
<div class="inner-edit-ct"> <div class="inner-edit-ct">
<textarea class="msg-reply textarea-fix user-select" maxlength="maxCommLength"><%=item.get("reply")%></textarea> <textarea class="msg-reply textarea-fix user-select textarea-control" maxlength="maxCommLength"><%=item.get("reply")%></textarea>
<button class="btn normal dlg-btn primary btn-inner-edit btn-fix" id="id-comments-change">textEdit</button> <button class="btn normal dlg-btn primary btn-inner-edit btn-fix" id="id-comments-change">textEdit</button>
<button class="btn normal dlg-btn btn-inner-close">textClose</button> <button class="btn normal dlg-btn btn-inner-close">textClose</button>
</div> </div>
@ -81,7 +81,7 @@
<% if (showReply) { %> <% if (showReply) { %>
<div class="reply-ct"> <div class="reply-ct">
<textarea class="msg-reply user-select" placeholder="textAddReply" maxlength="maxCommLength"></textarea> <textarea class="msg-reply user-select textarea-control" placeholder="textAddReply" maxlength="maxCommLength"></textarea>
<button class="btn normal dlg-btn primary btn-reply" id="id-comments-change">textReply</button> <button class="btn normal dlg-btn primary btn-reply" id="id-comments-change">textReply</button>
<button class="btn normal dlg-btn btn-close">textClose</button> <button class="btn normal dlg-btn btn-close">textClose</button>
</div> </div>

View file

@ -5,7 +5,7 @@
</div> </div>
<div style="display: none;" class="layout-item new-comment-ct"> <div style="display: none;" class="layout-item new-comment-ct">
<div class="inner-ct"> <div class="inner-ct">
<textarea id="comment-msg-new" class="user-select" placeholder="<%=textEnterCommentHint%>" maxlength="<%=maxCommLength%>"/> <textarea id="comment-msg-new" class="user-select textarea-control" placeholder="<%=textEnterCommentHint%>" maxlength="<%=maxCommLength%>"/>
</div> </div>
<button class="btn add normal dlg-btn primary"><%=textAddComment%></button> <button class="btn add normal dlg-btn primary"><%=textAddComment%></button>
<button class="btn cancel normal dlg-btn"><%=textCancel%></button> <button class="btn cancel normal dlg-btn"><%=textCancel%></button>

View file

@ -227,8 +227,8 @@ define([
if (/msg-reply/.test(e.target.className)) { if (/msg-reply/.test(e.target.className)) {
me.dontCloseDummyComment = true; me.dontCloseDummyComment = true;
me.beforeShowDummyComment = me.beforeCloseDummyComment = false; me.beforeShowDummyComment = me.beforeCloseDummyComment = false;
} else if (/chat-msg-text/.test(e.target.id)) } else if (/textarea-control/.test(e.target.className))
me.dontCloseChat = true; me.inTextareaControl = true;
else if (!me.isModalShowed && /form-control/.test(e.target.className)) else if (!me.isModalShowed && /form-control/.test(e.target.className))
me.inFormControl = true; me.inFormControl = true;
} }
@ -255,8 +255,8 @@ define([
else else
me.beforeCloseDummyComment = true; me.beforeCloseDummyComment = true;
} }
else if (/chat-msg-text/.test(e.target.id)) else if (/textarea-control/.test(e.target.className))
me.dontCloseChat = false; me.inTextareaControl = false;
} }
} }
}).on('dragover', function(e) { }).on('dragover', function(e) {
@ -754,7 +754,7 @@ define([
if ( type == Asc.c_oAscAsyncActionType.BlockInteraction && if ( type == Asc.c_oAscAsyncActionType.BlockInteraction &&
(!this.getApplication().getController('LeftMenu').dlgSearch || !this.getApplication().getController('LeftMenu').dlgSearch.isVisible()) && (!this.getApplication().getController('LeftMenu').dlgSearch || !this.getApplication().getController('LeftMenu').dlgSearch.isVisible()) &&
(!this.getApplication().getController('Toolbar').dlgSymbolTable || !this.getApplication().getController('Toolbar').dlgSymbolTable.isVisible()) && (!this.getApplication().getController('Toolbar').dlgSymbolTable || !this.getApplication().getController('Toolbar').dlgSymbolTable.isVisible()) &&
!((id == Asc.c_oAscAsyncAction['LoadDocumentFonts'] || id == Asc.c_oAscAsyncAction['ApplyChanges']) && (this.dontCloseDummyComment || this.dontCloseChat || this.isModalShowed || this.inFormControl)) ) { !((id == Asc.c_oAscAsyncAction['LoadDocumentFonts'] || id == Asc.c_oAscAsyncAction['ApplyChanges']) && (this.dontCloseDummyComment || this.inTextareaControl || this.isModalShowed || this.inFormControl)) ) {
// this.onEditComplete(this.loadMask); //если делать фокус, то при принятии чужих изменений, заканчивается свой композитный ввод // this.onEditComplete(this.loadMask); //если делать фокус, то при принятии чужих изменений, заканчивается свой композитный ввод
this.api.asc_enableKeyEvents(true); this.api.asc_enableKeyEvents(true);
} }

View file

@ -202,8 +202,8 @@ define([
if (!/area_id/.test(e.target.id)) { if (!/area_id/.test(e.target.id)) {
if (/msg-reply/.test(e.target.className)) if (/msg-reply/.test(e.target.className))
me.dontCloseDummyComment = true; me.dontCloseDummyComment = true;
else if (/chat-msg-text/.test(e.target.id)) else if (/textarea-control/.test(e.target.className))
me.dontCloseChat = true; me.inTextareaControl = true;
else if (!me.isModalShowed && /form-control/.test(e.target.className)) else if (!me.isModalShowed && /form-control/.test(e.target.className))
me.inFormControl = true; me.inFormControl = true;
} }
@ -226,8 +226,8 @@ define([
me.api.asc_enableKeyEvents(true); me.api.asc_enableKeyEvents(true);
if (/msg-reply/.test(e.target.className)) if (/msg-reply/.test(e.target.className))
me.dontCloseDummyComment = false; me.dontCloseDummyComment = false;
else if (/chat-msg-text/.test(e.target.id)) else if (/textarea-control/.test(e.target.className))
me.dontCloseChat = false; me.inTextareaControl = false;
} }
} }
}).on('dragover', function(e) { }).on('dragover', function(e) {
@ -517,7 +517,7 @@ define([
if (this.appOptions.isEdit && (id==Asc.c_oAscAsyncAction['Save'] || id==Asc.c_oAscAsyncAction['ForceSaveButton']) && (!this._state.fastCoauth || this._state.usersCount<2)) if (this.appOptions.isEdit && (id==Asc.c_oAscAsyncAction['Save'] || id==Asc.c_oAscAsyncAction['ForceSaveButton']) && (!this._state.fastCoauth || this._state.usersCount<2))
this.synchronizeChanges(); this.synchronizeChanges();
if (type == Asc.c_oAscAsyncActionType.BlockInteraction && !((id == Asc.c_oAscAsyncAction['LoadDocumentFonts'] || id == Asc.c_oAscAsyncAction['ApplyChanges']) && (this.dontCloseDummyComment || this.dontCloseChat || this.isModalShowed || this.inFormControl))) { if (type == Asc.c_oAscAsyncActionType.BlockInteraction && !((id == Asc.c_oAscAsyncAction['LoadDocumentFonts'] || id == Asc.c_oAscAsyncAction['ApplyChanges']) && (this.dontCloseDummyComment || this.inTextareaControl || this.isModalShowed || this.inFormControl))) {
this.onEditComplete(this.loadMask); this.onEditComplete(this.loadMask);
this.api.asc_enableKeyEvents(true); this.api.asc_enableKeyEvents(true);
} }

View file

@ -216,8 +216,8 @@ define([
if (e && e.target && !/area_id/.test(e.target.id)) { if (e && e.target && !/area_id/.test(e.target.id)) {
if (/msg-reply/.test(e.target.className)) if (/msg-reply/.test(e.target.className))
me.dontCloseDummyComment = true; me.dontCloseDummyComment = true;
else if (/chat-msg-text/.test(e.target.id)) else if (/textarea-control/.test(e.target.className))
me.dontCloseChat = true; me.inTextareaControl = true;
else if (!me.isModalShowed && /form-control/.test(e.target.className)) else if (!me.isModalShowed && /form-control/.test(e.target.className))
me.inFormControl = true; me.inFormControl = true;
} }
@ -242,8 +242,8 @@ define([
me.api.asc_enableKeyEvents(true); me.api.asc_enableKeyEvents(true);
if (/msg-reply/.test(e.target.className)) if (/msg-reply/.test(e.target.className))
me.dontCloseDummyComment = false; me.dontCloseDummyComment = false;
else if (/chat-msg-text/.test(e.target.id)) else if (/textarea-control/.test(e.target.className))
me.dontCloseChat = false; me.inTextareaControl = false;
} }
} }
}).on('dragover', function(e) { }).on('dragover', function(e) {
@ -565,12 +565,12 @@ define([
this.setLongActionView(action); this.setLongActionView(action);
} else { } else {
if (this.loadMask) { if (this.loadMask) {
if (this.loadMask.isVisible() && !this.dontCloseDummyComment && !this.dontCloseChat && !this.isModalShowed && !this.inFormControl) if (this.loadMask.isVisible() && !this.dontCloseDummyComment && !this.inTextareaControl && !this.isModalShowed && !this.inFormControl)
this.api.asc_enableKeyEvents(true); this.api.asc_enableKeyEvents(true);
this.loadMask.hide(); this.loadMask.hide();
} }
if (type == Asc.c_oAscAsyncActionType.BlockInteraction && !( (id == Asc.c_oAscAsyncAction['LoadDocumentFonts'] || id == Asc.c_oAscAsyncAction['ApplyChanges']) && (this.dontCloseDummyComment || this.dontCloseChat || this.isModalShowed || this.inFormControl) )) if (type == Asc.c_oAscAsyncActionType.BlockInteraction && !( (id == Asc.c_oAscAsyncAction['LoadDocumentFonts'] || id == Asc.c_oAscAsyncAction['ApplyChanges']) && (this.dontCloseDummyComment || this.inTextareaControl || this.isModalShowed || this.inFormControl) ))
this.onEditComplete(this.loadMask, {restorefocus:true}); this.onEditComplete(this.loadMask, {restorefocus:true});
} }
}, },