mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-07-24 09:47:17 +08:00
Fix Bug 35934, update Bug 35851.
This commit is contained in:
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
Reference in New Issue
Block a user