diff --git a/cell/api.js b/cell/api.js index 4da34fd4d4..2197a4309f 100644 --- a/cell/api.js +++ b/cell/api.js @@ -1974,7 +1974,7 @@ var editor; this.IsFocus = isEnabled; if (isFromInput !== true && AscCommon.g_inputContext) - AscCommon.g_inputContext.InterfaceEnableKeyEvents = isEnabled; + AscCommon.g_inputContext.setInterfaceEnableKeyEvents(isEnabled); }; spreadsheet_api.prototype.asc_IsFocus = function(bIsNaturalFocus) { diff --git a/common/text_input.js b/common/text_input.js index 9754dfc6ca..08076299e1 100644 --- a/common/text_input.js +++ b/common/text_input.js @@ -531,6 +531,15 @@ } } } + }, + + setInterfaceEnableKeyEvents : function(value) + { + this.InterfaceEnableKeyEvents = value; + if (true == this.InterfaceEnableKeyEvents) + { + this.HtmlArea.focus(); + } } }; diff --git a/slide/api.js b/slide/api.js index 30538c6565..26d006c916 100644 --- a/slide/api.js +++ b/slide/api.js @@ -4253,7 +4253,7 @@ background-repeat: no-repeat;\ } if (isFromInput !== true && AscCommon.g_inputContext) - AscCommon.g_inputContext.InterfaceEnableKeyEvents = value; + AscCommon.g_inputContext.setInterfaceEnableKeyEvents(value); }; diff --git a/word/api.js b/word/api.js index be3f00d530..c7e129101f 100644 --- a/word/api.js +++ b/word/api.js @@ -6275,7 +6275,7 @@ background-repeat: no-repeat;\ } if (isFromInput !== true && AscCommon.g_inputContext) - AscCommon.g_inputContext.InterfaceEnableKeyEvents = value; + AscCommon.g_inputContext.setInterfaceEnableKeyEvents(value); }; asc_docs_api.prototype.asc_IsFocus = function(bIsNaturalFocus) {