diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index bbac3ac3e..146276f1a 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -210,6 +210,8 @@ define([ me.dontCloseDummyComment = true; else if (/chat-msg-text/.test(e.target.id)) me.dontCloseChat = true; + else if (/form-control/.test(e.target.className)) + me.inFormControl = true; } }); @@ -226,6 +228,8 @@ define([ me.dontCloseDummyComment = false; else if (/chat-msg-text/.test(e.target.id)) me.dontCloseChat = false; + else if (/form-control/.test(e.target.className)) + me.inFormControl = false; } } }).on('dragover', function(e) { @@ -665,7 +669,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 || this.dontCloseChat || this.isModalShowed )) ) { + !( id == Asc.c_oAscAsyncAction['ApplyChanges'] && (this.dontCloseDummyComment || this.dontCloseChat || this.isModalShowed || this.inFormControl)) ) { // this.onEditComplete(this.loadMask); //если делать фокус, то при принятии чужих изменений, заканчивается свой композитный ввод this.api.asc_enableKeyEvents(true); } diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index 40d72c595..4574d09f2 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -191,6 +191,8 @@ define([ me.dontCloseDummyComment = true; else if (/chat-msg-text/.test(e.target.id)) me.dontCloseChat = true; + else if (/form-control/.test(e.target.className)) + me.inFormControl = true; } }); @@ -207,6 +209,8 @@ define([ me.dontCloseDummyComment = false; else if (/chat-msg-text/.test(e.target.id)) me.dontCloseChat = false; + else if (/form-control/.test(e.target.className)) + me.inFormControl = false; } } }).on('dragover', function(e) { @@ -456,7 +460,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 || this.dontCloseChat || this.isModalShowed ))) { + if (type == Asc.c_oAscAsyncActionType.BlockInteraction && !((id == Asc.c_oAscAsyncAction['LoadDocumentFonts'] || id == Asc.c_oAscAsyncAction['ApplyChanges']) && (this.dontCloseDummyComment || this.dontCloseChat || this.isModalShowed || this.inFormControl))) { this.onEditComplete(this.loadMask); this.api.asc_enableKeyEvents(true); } diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index 416187f54..eddf0e537 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -197,6 +197,8 @@ define([ me.dontCloseDummyComment = true; else if (/chat-msg-text/.test(e.target.id)) me.dontCloseChat = true; + else if (/form-control/.test(e.target.className)) + me.inFormControl = true; } }); @@ -215,6 +217,8 @@ define([ me.dontCloseDummyComment = false; else if (/chat-msg-text/.test(e.target.id)) me.dontCloseChat = false; + else if (/form-control/.test(e.target.className)) + me.inFormControl = false; } } }).on('dragover', function(e) { @@ -476,12 +480,12 @@ define([ this.setLongActionView(action); } else { if (this.loadMask) { - if (this.loadMask.isVisible() && !this.dontCloseDummyComment && !this.dontCloseChat && !this.isModalShowed ) + if (this.loadMask.isVisible() && !this.dontCloseDummyComment && !this.dontCloseChat && !this.isModalShowed && !this.inFormControl) 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 || this.dontCloseChat || this.isModalShowed ) )) + if (type == Asc.c_oAscAsyncActionType.BlockInteraction && !( (id == Asc.c_oAscAsyncAction['LoadDocumentFonts'] || id == Asc.c_oAscAsyncAction['ApplyChanges']) && (this.dontCloseDummyComment || this.dontCloseChat || this.isModalShowed || this.inFormControl) )) this.onEditComplete(this.loadMask, {restorefocus:true}); } },