From e10b46c0fc87b0a3a42747fcce9e75833ad8728c Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 28 Jul 2016 15:37:58 +0300 Subject: [PATCH] Fix bug with text input after mouse click to left/right panels, toolbar or statusbar. --- apps/documenteditor/main/app/controller/Main.js | 7 ++----- apps/presentationeditor/main/app/controller/Main.js | 7 ++----- apps/spreadsheeteditor/main/app/controller/Main.js | 5 +++-- 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index b187efe68..326d52ac1 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -162,11 +162,8 @@ define([ $(document.body).on('blur', 'input, textarea', function(e) { if (!me.isModalShowed) { - /* - * TODO: Workaround bug #25004. Clipboard feature processing in sdk. - */ - if (!(Common.Utils.isSafari && Common.Utils.isMac) && !/area_id/.test(e.target.id) && - $(e.target).parent().find(e.relatedTarget).length<1 /* When focus in combobox goes from input to it's menu button or menu items */) { + if (!/area_id/.test(e.target.id) && $(e.target).parent().find(e.relatedTarget).length<1 /* When focus in combobox goes from input to it's menu button or menu items */ + || !e.relatedTarget) { me.api.asc_enableKeyEvents(true); if (/msg-reply/.test(e.target.className)) me.dontCloseDummyComment = false; diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index b8a6b5c06..596aacb9d 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -146,11 +146,8 @@ define([ $(document.body).on('blur', 'input, textarea', function(e) { if (!me.isModalShowed) { - /* - * TODO: Workaround bug #25004. Clipboard feature processing in sdk. - */ - if (!(Common.Utils.isSafari && Common.Utils.isMac) && !/area_id/.test(e.target.id) && - $(e.target).parent().find(e.relatedTarget).length<1 /* When focus in combobox goes from input to it's menu button or menu items */) { + if (!/area_id/.test(e.target.id) && $(e.target).parent().find(e.relatedTarget).length<1 /* When focus in combobox goes from input to it's menu button or menu items */ + || !e.relatedTarget) { me.api.asc_enableKeyEvents(true); if (/msg-reply/.test(e.target.className)) me.dontCloseDummyComment = false; diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index 34fbe6468..0321aef64 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -158,8 +158,9 @@ define([ $(document.body).on('blur', 'input, textarea', function(e) { if (this.isAppDisabled === true) return; - if (!me.isModalShowed && !(me.loadMask && me.loadMask.isVisible()) && !/area_id/.test(e.target.id) && - $(e.target).parent().find(e.relatedTarget).length<1 /* When focus in combobox goes from input to it's menu button or menu items */) { + if (!me.isModalShowed && !(me.loadMask && me.loadMask.isVisible()) && + (!/area_id/.test(e.target.id) && $(e.target).parent().find(e.relatedTarget).length<1 /* When focus in combobox goes from input to it's menu button or menu items */ + || !e.relatedTarget)) { me.api.asc_enableKeyEvents(true); if (/msg-reply/.test(e.target.className)) me.dontCloseDummyComment = false;