Commit 0b595593 authored by Alexey Golubev's avatar Alexey Golubev

Merge branch 'hotfix/v4.2.1'

parents 817962df bd22dd67
......@@ -2601,9 +2601,8 @@
/** @param event {MouseEvent} */
CellEditor.prototype._onMouseDown = function (event) {
if (AscCommon.g_inputContext) {
AscCommon.g_inputContext.externalChangeFocus();
}
if (AscCommon.g_inputContext && AscCommon.g_inputContext.externalChangeFocus())
return;
var pos;
var coord = this._getCoordinates(event);
......
......@@ -2866,7 +2866,7 @@ function DrawingObjects() {
_this.controller.selectObject(aObjects[0].graphicObject, 0);
}
_this.controller.editChartDrawingObjects(chart);
_this.showDrawingObjects(false);
//_this.showDrawingObjects(false);
}
};
......
......@@ -810,8 +810,20 @@
if (AscCommon.AscBrowser.isIE)
{
oEvent.preventDefault = function () {
Object.defineProperty(this, "defaultPrevented", {get: function () {return true;}});
oEvent.preventDefault = function ()
{
try
{
Object.defineProperty(this, "defaultPrevented", {
get: function ()
{
return true;
}
});
}
catch(err)
{
}
};
}
......@@ -1411,6 +1423,8 @@
if (_locale == undefined || _locale == null)
_locale = "";
ti_console_log_ms("msCheckComposition: " + type);
var isNoUseCtx = ((_locale.indexOf("zh-Hant") == 0) || (_locale.indexOf("zh-Hans") == 0)) ? true : false;
// этот код нарушает китайский ввод (написать много, и начать выбирать мышкой!!! по короткими частям)
// но пока так. иначе проблемы на корейском
......@@ -1428,6 +1442,7 @@
{
// не натуральный end!!!
type = c_oCompositionState.process;
ti_console_log_ms("msCheckComposition: end => process");
}
}
}
......@@ -1445,7 +1460,13 @@
if (_value.indexOf(this.ieNonCompositionPrefixConfirm) != 0)
{
// по идее нужно стереть, но мы пока просто заканчиваем ввод
ti_console_log_ms("msCheckComposition: externalEndCompositeInput");
ti_console_log_ms("[" + _value + "], prefix: " + this.ieNonCompositionPrefixConfirm);
this.externalEndCompositeInput();
if (type == c_oCompositionState.end)
{
this.apiCompositeEnd();
}
return;
}
}
......@@ -1489,6 +1510,8 @@
if (type == c_oCompositionState.end)
{
ti_console_log_ms("msCheckComposition: end!!!");
this.apiCompositeEnd();
this.unlockTarget();
......@@ -1618,11 +1641,21 @@
externalChangeFocus : function()
{
if (this.compositionState == c_oCompositionState.process)
if (this.compositionState == c_oCompositionState.end)
return false;
setTimeout(function()
{
this.apiCompositeEnd();
this.clear();
}
var _input = window['AscCommon'].g_inputContext;
if (_input.compositionState == c_oCompositionState.process)
{
//_input.apiCompositeEnd();
_input.clear();
}
}, 10);
return true;
}
};
......
......@@ -3232,8 +3232,8 @@ function CThumbnailsManager()
else
e.returnValue = false;
if (AscCommon.g_inputContext)
AscCommon.g_inputContext.externalChangeFocus();
if (AscCommon.g_inputContext && AscCommon.g_inputContext.externalChangeFocus())
return;
var control = oThis.m_oWordControl.m_oThumbnails.HtmlElement;
if (global_mouseEvent.IsLocked == true && global_mouseEvent.Sender != control)
......
......@@ -1353,8 +1353,8 @@ function CEditorPage(api)
if (false === oThis.m_oApi.bInit_word_control)
return;
if (AscCommon.g_inputContext)
AscCommon.g_inputContext.externalChangeFocus();
if (AscCommon.g_inputContext && AscCommon.g_inputContext.externalChangeFocus())
return;
var _isCatch = false;
......@@ -1586,8 +1586,8 @@ function CEditorPage(api)
e.returnValue = false;
}
if (AscCommon.g_inputContext)
AscCommon.g_inputContext.externalChangeFocus();
if (AscCommon.g_inputContext && AscCommon.g_inputContext.externalChangeFocus())
return;
oWordControl.Thumbnails.SetFocusElement(FOCUS_OBJECT_MAIN);
if (oWordControl.DemonstrationManager.Mode)
......
......@@ -808,8 +808,8 @@ function CEditorPage(api)
this.TextBoxBackground.HtmlElement["ontouchstart"] = function(e)
{
if (AscCommon.g_inputContext)
AscCommon.g_inputContext.externalChangeFocus();
if (AscCommon.g_inputContext && AscCommon.g_inputContext.externalChangeFocus())
return;
if (!oThis.IsFocus)
oThis.m_oApi.asc_enableKeyEvents(true);
......@@ -844,8 +844,8 @@ function CEditorPage(api)
{
this.TextBoxBackground.HtmlElement["onmousedown"] = function(e)
{
if (AscCommon.g_inputContext)
AscCommon.g_inputContext.externalChangeFocus();
if (AscCommon.g_inputContext && AscCommon.g_inputContext.externalChangeFocus())
return;
oThis.IsUpdateOverlayOnlyEndReturn = true;
oThis.StartUpdateOverlay();
......@@ -1599,8 +1599,8 @@ function CEditorPage(api)
e.returnValue = false;
}
if (AscCommon.g_inputContext)
AscCommon.g_inputContext.externalChangeFocus();
if (AscCommon.g_inputContext && AscCommon.g_inputContext.externalChangeFocus())
return;
var oWordControl = oThis;
......
......@@ -1073,9 +1073,9 @@ CHistory.prototype.private_UpdateContentChangesOnRedo = function(Item)
var bAdd = this.private_IsAddContentChange(Item.Class, Item.Data);
var Count = this.private_GetItemsCountInContentChange(Item.Class, Item.Data);
var ContentChanges = new AscCommon.CContentChangesElement( ( bAdd == true ? AscCommon.contentchanges_Add : AscCommon.contentchanges_Remove ), Data.Pos, Count, Item );
Class.Add_ContentChanges( ContentChanges );
this.CollaborativeEditing.Add_NewDC( Class );
var ContentChanges = new AscCommon.CContentChangesElement(( bAdd == true ? AscCommon.contentchanges_Add : AscCommon.contentchanges_Remove ), Item.Data.Pos, Count, Item);
Item.Class.Add_ContentChanges(ContentChanges);
this.CollaborativeEditing.Add_NewDC(Item.Class);
}
};
CHistory.prototype.private_IsContentChange = function(Class, Data)
......@@ -1098,6 +1098,8 @@ CHistory.prototype.private_IsContentChange = function(Class, Data)
};
CHistory.prototype.private_IsAddContentChange = function(Class, Data)
{
var bPresentation = !(typeof CPresentation === "undefined");
var bSlide = !(typeof Slide === "undefined");
return ( ( Class instanceof CDocument && AscDFH.historyitem_Document_AddItem === Data.Type ) ||
( ((Class instanceof CDocumentContent || Class instanceof AscFormat.CDrawingDocContent)) && AscDFH.historyitem_DocumentContent_AddItem === Data.Type ) ||
( Class instanceof CTable && AscDFH.historyitem_Table_AddRow === Data.Type ) ||
......
......@@ -8957,6 +8957,7 @@ background-repeat: no-repeat;\
asc_docs_api.prototype['asc_setDrawCollaborationMarks'] = asc_docs_api.prototype.asc_setDrawCollaborationMarks;
asc_docs_api.prototype['asc_AddMath'] = asc_docs_api.prototype.asc_AddMath;
asc_docs_api.prototype['asc_AddMath2'] = asc_docs_api.prototype.asc_AddMath2;
asc_docs_api.prototype['asc_AddPageCount'] = asc_docs_api.prototype.asc_AddPageCount;
asc_docs_api.prototype['asc_StartMailMerge'] = asc_docs_api.prototype.asc_StartMailMerge;
asc_docs_api.prototype['asc_StartMailMergeByList'] = asc_docs_api.prototype.asc_StartMailMergeByList;
asc_docs_api.prototype['asc_GetReceptionsCount'] = asc_docs_api.prototype.asc_GetReceptionsCount;
......
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