From 76f211f1fcb8b2978467067d376bf9c404fe1da1 Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Fri, 12 Jul 2019 18:13:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=20input?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/single/input/input.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/base/single/input/input.js b/src/base/single/input/input.js index 6325cad9c..68e975326 100644 --- a/src/base/single/input/input.js +++ b/src/base/single/input/input.js @@ -58,10 +58,10 @@ BI.Input = BI.inherit(BI.Single, { // 通过keyCode判断会漏掉输入法点击输入(右键粘贴暂缓) var originalEvent = e.originalEvent; if (BI.isNull(originalEvent.propertyName) || originalEvent.propertyName === "value") { - keyCode = null; inputEventValid = true; self._keydown_ = true; _keydown(keyCode); + keyCode = null; } }) .click(function (e) { @@ -166,7 +166,10 @@ BI.Input = BI.inherit(BI.Single, { } this.fireEvent(BI.Input.EVENT_KEY_DOWN); - if (BI.isEndWithBlank(this.getValue()) && BI.trim(this.getValue()) === BI.trim(this._lastValue || "")) { + if(BI.trim(this.getValue()) !== BI.trim(this._lastValue || "")){ + this._valueChange(); + } + if (BI.isEndWithBlank(this.getValue())) { this._pause = true; this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.PAUSE, "", this); this.fireEvent(BI.Input.EVENT_PAUSE); @@ -175,9 +178,6 @@ BI.Input = BI.inherit(BI.Single, { BI.trim(this.getValue()) === "" && (this._lastValue !== null && BI.trim(this._lastValue) !== "")) { this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.STOPEDIT, this.getValue(), this); this.fireEvent(BI.Input.EVENT_STOP); - this._valueChange(); - } else { - this._valueChange(); } },