From f0ebad683c800593902e3967eb0c0b728b25bdb2 Mon Sep 17 00:00:00 2001 From: Oleg Korshul <Oleg.Korshul@onlyoffice.com> Date: Thu, 9 Jun 2016 16:52:30 +0300 Subject: [PATCH] =?UTF-8?q?=D0=B2=D0=B2=D0=BE=D0=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/text_input.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/common/text_input.js b/common/text_input.js index 452e50135..0a90f144c 100644 --- a/common/text_input.js +++ b/common/text_input.js @@ -94,11 +94,11 @@ }, 10); }, - move : function() + move : function(x, y) { var oTarget = document.getElementById(this.TargetId); - var xPos = parseInt(oTarget.style.left); - var yPos = parseInt(oTarget.style.top) + parseInt(oTarget.style.height); + var xPos = x ? x : parseInt(oTarget.style.left); + var yPos = (y ? y : parseInt(oTarget.style.top)) + parseInt(oTarget.style.height); this.HtmlDiv.style.left = xPos + "px"; this.HtmlDiv.style.top = yPos + this.HtmlAreaOffset + "px"; // еще бы ÑдвинутьÑÑ Ð½Ð° выÑоту Ñтроки @@ -186,7 +186,7 @@ this.Listener.Begin_CompositeInput(); }, - onCompositionUpdate : function(e) + onCompositionUpdate : function(e, isLockTarget) { var _old = this.compositionValue.splice(0); this.checkCompositionData(e.data); @@ -205,7 +205,9 @@ } } - this.lockTarget(); + if (isLockTarget !== false) + this.lockTarget(); + if (!_isEqual) this.Listener.Replace_CompositeText(this.compositionValue); @@ -214,6 +216,7 @@ onCompositionEnd : function(e) { + this.onCompositionUpdate(e, false); this.Listener.Set_CursorPosInCompositeText(1000); // max this.clear(); -- 2.30.9