Commit 89ce4483 authored by Oleg Korshul's avatar Oleg Korshul

text input focus change (mouse).

parent 1e9e57a2
...@@ -1481,6 +1481,15 @@ ...@@ -1481,6 +1481,15 @@
externalEndCompositeInput : function() externalEndCompositeInput : function()
{ {
this.clear(); this.clear();
},
externalChangeFocus : function()
{
if (this.compositionState == c_oCompositionState.process)
{
this.Api.End_CompositeInput();
this.clear();
}
} }
}; };
......
...@@ -3232,6 +3232,9 @@ function CThumbnailsManager() ...@@ -3232,6 +3232,9 @@ function CThumbnailsManager()
else else
e.returnValue = false; e.returnValue = false;
if (AscCommon.g_inputContext)
AscCommon.g_inputContext.externalChangeFocus();
var control = oThis.m_oWordControl.m_oThumbnails.HtmlElement; var control = oThis.m_oWordControl.m_oThumbnails.HtmlElement;
if (global_mouseEvent.IsLocked == true && global_mouseEvent.Sender != control) if (global_mouseEvent.IsLocked == true && global_mouseEvent.Sender != control)
{ {
......
...@@ -1352,6 +1352,9 @@ function CEditorPage(api) ...@@ -1352,6 +1352,9 @@ function CEditorPage(api)
if (false === oThis.m_oApi.bInit_word_control) if (false === oThis.m_oApi.bInit_word_control)
return; return;
if (AscCommon.g_inputContext)
AscCommon.g_inputContext.externalChangeFocus();
var _isCatch = false; var _isCatch = false;
var downClick = global_mouseEvent.ClickCount; var downClick = global_mouseEvent.ClickCount;
...@@ -1582,6 +1585,9 @@ function CEditorPage(api) ...@@ -1582,6 +1585,9 @@ function CEditorPage(api)
e.returnValue = false; e.returnValue = false;
} }
if (AscCommon.g_inputContext)
AscCommon.g_inputContext.externalChangeFocus();
oWordControl.Thumbnails.SetFocusElement(FOCUS_OBJECT_MAIN); oWordControl.Thumbnails.SetFocusElement(FOCUS_OBJECT_MAIN);
if (oWordControl.DemonstrationManager.Mode) if (oWordControl.DemonstrationManager.Mode)
return false; return false;
......
...@@ -1703,7 +1703,7 @@ function CEditorPage(api) ...@@ -1703,7 +1703,7 @@ function CEditorPage(api)
this.onMouseDown = function(e, isTouch) this.onMouseDown = function(e, isTouch)
{ {
console.log("down: " + isTouch + ", " + AscCommon.isTouch); //console.log("down: " + isTouch + ", " + AscCommon.isTouch);
if (false === oThis.m_oApi.bInit_word_control || (AscCommon.isTouch && undefined === isTouch)) if (false === oThis.m_oApi.bInit_word_control || (AscCommon.isTouch && undefined === isTouch))
return; return;
...@@ -1715,6 +1715,9 @@ function CEditorPage(api) ...@@ -1715,6 +1715,9 @@ function CEditorPage(api)
e.returnValue = false; e.returnValue = false;
} }
if (AscCommon.g_inputContext)
AscCommon.g_inputContext.externalChangeFocus();
var oWordControl = oThis; var oWordControl = oThis;
if (this.id == "id_viewer" && oThis.m_oOverlay.HtmlElement.style.display == "block") if (this.id == "id_viewer" && oThis.m_oOverlay.HtmlElement.style.display == "block")
...@@ -1889,7 +1892,7 @@ function CEditorPage(api) ...@@ -1889,7 +1892,7 @@ function CEditorPage(api)
}; };
this.onMouseUp = function(e, bIsWindow, isTouch) this.onMouseUp = function(e, bIsWindow, isTouch)
{ {
console.log("up: " + isTouch + ", " + AscCommon.isTouch); //console.log("up: " + isTouch + ", " + AscCommon.isTouch);
if (false === oThis.m_oApi.bInit_word_control || (AscCommon.isTouch && undefined === isTouch)) if (false === oThis.m_oApi.bInit_word_control || (AscCommon.isTouch && undefined === isTouch))
return; return;
//if (true == global_mouseEvent.IsLocked) //if (true == global_mouseEvent.IsLocked)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment