From cd2eabe42727f4dc94b4292e2f8dc34030db4f09 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 11 Sep 2019 13:38:02 +0300 Subject: [PATCH] Fix for rev. 1f315318168c134a42d66a4303a00a7c65f2d7ad ([SSE] Open advanced settings, set units, ctrl+v to canvas -> text isn't entered to cell) --- apps/documenteditor/main/app/controller/Main.js | 4 +++- apps/presentationeditor/main/app/controller/Main.js | 4 +++- apps/spreadsheeteditor/main/app/controller/Main.js | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index 25986829a6..2476a50bae 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -229,9 +229,11 @@ define([ }); $(document.body).on('blur', 'input, textarea', function(e) { - if (!me.isModalShowed && !me.getApplication().getController('LeftMenu').getView('LeftMenu').getMenu('file').isVisible()) { + if (!me.isModalShowed) { if (/form-control/.test(e.target.className)) me.inFormControl = false; + if (me.getApplication().getController('LeftMenu').getView('LeftMenu').getMenu('file').isVisible()) + return; if (!e.relatedTarget || !/area_id/.test(e.target.id) && !(e.target.localName == 'input' && $(e.target).parent().find(e.relatedTarget).length>0) /* Check if focus in combobox goes from input to it's menu button or menu items, or from comment editing area to Ok/Cancel button */ diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index cc4ef086d4..a4eb0b592f 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -207,9 +207,11 @@ define([ }); $(document.body).on('blur', 'input, textarea', function(e) { - if (!me.isModalShowed && !me.getApplication().getController('LeftMenu').getView('LeftMenu').getMenu('file').isVisible()) { + if (!me.isModalShowed) { if (/form-control/.test(e.target.className)) me.inFormControl = false; + if (me.getApplication().getController('LeftMenu').getView('LeftMenu').getMenu('file').isVisible()) + return; if (!e.relatedTarget || !/area_id/.test(e.target.id) && !(e.target.localName == 'input' && $(e.target).parent().find(e.relatedTarget).length>0) /* Check if focus in combobox goes from input to it's menu button or menu items, or from comment editing area to Ok/Cancel button */ diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index f382175bcd..74e292259b 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -216,9 +216,11 @@ define([ $(document.body).on('blur', 'input, textarea', function(e) { if (me.isAppDisabled === true || me.isFrameClosed) return; - if ((!me.isModalShowed || $('.asc-window.enable-key-events:visible').length>0) && !(me.loadMask && me.loadMask.isVisible()) && !me.getApplication().getController('LeftMenu').getView('LeftMenu').getMenu('file').isVisible()) { + if ((!me.isModalShowed || $('.asc-window.enable-key-events:visible').length>0) && !(me.loadMask && me.loadMask.isVisible())) { if (/form-control/.test(e.target.className)) me.inFormControl = false; + if (me.getApplication().getController('LeftMenu').getView('LeftMenu').getMenu('file').isVisible()) + return; if (!e.relatedTarget || !/area_id/.test(e.target.id) && !(e.target.localName == 'input' && $(e.target).parent().find(e.relatedTarget).length>0) /* Check if focus in combobox goes from input to it's menu button or menu items, or from comment editing area to Ok/Cancel button */