Fix Bug 35934, update Bug 35851.

This commit is contained in:
Julia Radzhabova 2017-10-02 14:08:26 +03:00
parent aa23ed4418
commit a0dfdea5aa
3 changed files with 3 additions and 3 deletions

View file

@ -196,7 +196,7 @@ define([
$(document.body).on('blur', 'input, textarea', function(e) {
if (!me.isModalShowed) {
if (!e.relatedTarget ||
!/area_id/.test(e.target.id) && (e.relatedTarget.localName != 'input' || $(e.target).parent().find(e.relatedTarget).length<1) /* Check if focus in combobox goes from input to it's menu button or menu items */
!/area_id/.test(e.target.id) && ($(e.target).parent().find(e.relatedTarget).length<1 || e.target.localName == 'textarea') /* 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 */
&& (e.relatedTarget.localName != 'input' || !/form-control/.test(e.relatedTarget.className)) /* Check if focus goes to text input with class "form-control" */
&& (e.relatedTarget.localName != 'textarea' || /area_id/.test(e.relatedTarget.id))) /* Check if focus goes to textarea, but not to "area_id" */ {
me.api.asc_enableKeyEvents(true);

View file

@ -192,7 +192,7 @@ define([
$(document.body).on('blur', 'input, textarea', function(e) {
if (!me.isModalShowed) {
if (!e.relatedTarget ||
!/area_id/.test(e.target.id) && (e.relatedTarget.localName != 'input' || $(e.target).parent().find(e.relatedTarget).length<1) /* Check if focus in combobox goes from input to it's menu button or menu items */
!/area_id/.test(e.target.id) && ($(e.target).parent().find(e.relatedTarget).length<1 || e.target.localName == 'textarea') /* 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 */
&& (e.relatedTarget.localName != 'input' || !/form-control/.test(e.relatedTarget.className)) /* Check if focus goes to text input with class "form-control" */
&& (e.relatedTarget.localName != 'textarea' || /area_id/.test(e.relatedTarget.id))) /* Check if focus goes to textarea, but not to "area_id" */ {
me.api.asc_enableKeyEvents(true);

View file

@ -201,7 +201,7 @@ define([
if (!me.isModalShowed && !(me.loadMask && me.loadMask.isVisible())) {
if (!e.relatedTarget ||
!/area_id/.test(e.target.id) && (e.relatedTarget.localName != 'input' || $(e.target).parent().find(e.relatedTarget).length<1) /* Check if focus in combobox goes from input to it's menu button or menu items */
!/area_id/.test(e.target.id) && ($(e.target).parent().find(e.relatedTarget).length<1 || e.target.localName == 'textarea') /* 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 */
&& (e.relatedTarget.localName != 'input' || !/form-control/.test(e.relatedTarget.className)) /* Check if focus goes to text input with class "form-control" */
&& (e.relatedTarget.localName != 'textarea' || /area_id/.test(e.relatedTarget.id))) /* Check if focus goes to textarea, but not to "area_id" */ {
me.api.asc_enableKeyEvents(true);