From 4149278da761009bcf2edcd33a17ea5a1c592352 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 15 Apr 2019 13:41:08 +0300 Subject: [PATCH] [DE] Bug 41193 --- apps/documenteditor/main/app/controller/Main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index 8fd287808..dbeb56c8c 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -218,7 +218,7 @@ define([ // Syncronize focus with api $(document.body).on('focus', 'input, textarea', function(e) { if (!/area_id/.test(e.target.id)) { - if (/msg-reply/.test(e.target.className) && me.contComments && me.contComments.isDummyComment) { + if (/msg-reply/.test(e.target.className)) { me.dontCloseDummyComment = true; me.beforeCloseDummyComment = false; } else if (/chat-msg-text/.test(e.target.id)) @@ -240,7 +240,7 @@ define([ return; me.api.asc_enableKeyEvents(true); if (me.dontCloseDummyComment && /msg-reply/.test(e.target.className)) { - if ($(e.target).parent().find(e.relatedTarget).length<1) /* Check if focus goes to Add or Cancel buttons in comment window */ + if ($(e.target).closest('.user-comment-item').find(e.relatedTarget).length<1) /* Check if focus goes to buttons in the comment window */ me.dontCloseDummyComment = me.beforeCloseDummyComment = false; else me.beforeCloseDummyComment = true;