Browse Source

Merge pull request #1015 in VISUAL/fineui from ~WINDY/fineui:master to master

* commit '76f211f1fcb8b2978467067d376bf9c404fe1da1':
  无JIRA任务 input修改
es6
guy 5 years ago
parent
commit
cfab369ca8
  1. 10
      src/base/single/input/input.js

10
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();
}
},

Loading…
Cancel
Save