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

text input focus change (mouse).

parent 1e9e57a2
......@@ -1481,6 +1481,15 @@
externalEndCompositeInput : function()
{
this.clear();
},
externalChangeFocus : function()
{
if (this.compositionState == c_oCompositionState.process)
{
this.Api.End_CompositeInput();
this.clear();
}
}
};
......
......@@ -3232,6 +3232,9 @@ function CThumbnailsManager()
else
e.returnValue = false;
if (AscCommon.g_inputContext)
AscCommon.g_inputContext.externalChangeFocus();
var control = oThis.m_oWordControl.m_oThumbnails.HtmlElement;
if (global_mouseEvent.IsLocked == true && global_mouseEvent.Sender != control)
{
......
......@@ -1352,6 +1352,9 @@ function CEditorPage(api)
if (false === oThis.m_oApi.bInit_word_control)
return;
if (AscCommon.g_inputContext)
AscCommon.g_inputContext.externalChangeFocus();
var _isCatch = false;
var downClick = global_mouseEvent.ClickCount;
......@@ -1582,6 +1585,9 @@ function CEditorPage(api)
e.returnValue = false;
}
if (AscCommon.g_inputContext)
AscCommon.g_inputContext.externalChangeFocus();
oWordControl.Thumbnails.SetFocusElement(FOCUS_OBJECT_MAIN);
if (oWordControl.DemonstrationManager.Mode)
return false;
......
......@@ -1703,7 +1703,7 @@ function CEditorPage(api)
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))
return;
......@@ -1715,6 +1715,9 @@ function CEditorPage(api)
e.returnValue = false;
}
if (AscCommon.g_inputContext)
AscCommon.g_inputContext.externalChangeFocus();
var oWordControl = oThis;
if (this.id == "id_viewer" && oThis.m_oOverlay.HtmlElement.style.display == "block")
......@@ -1889,7 +1892,7 @@ function CEditorPage(api)
};
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))
return;
//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