|
|
@ -8490,8 +8490,9 @@ BI.Editor = BI.inherit(BI.Single, { |
|
|
|
this.editor.on(BI.Input.EVENT_KEY_DOWN, function (v) { |
|
|
|
this.editor.on(BI.Input.EVENT_KEY_DOWN, function (v) { |
|
|
|
self.fireEvent(BI.Editor.EVENT_KEY_DOWN, arguments); |
|
|
|
self.fireEvent(BI.Editor.EVENT_KEY_DOWN, arguments); |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.editor.on(BI.Input.EVENT_QUICK_DOWN, function (v) { |
|
|
|
this.editor.on(BI.Input.EVENT_QUICK_DOWN, function (e) { |
|
|
|
self.watermark && self.watermark.invisible(); |
|
|
|
// tab键就不要隐藏了
|
|
|
|
|
|
|
|
self.watermark && e.keyCode !== 9 && self.watermark.invisible(); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
this.editor.on(BI.Input.EVENT_VALID, function () { |
|
|
|
this.editor.on(BI.Input.EVENT_VALID, function () { |
|
|
@ -9731,6 +9732,10 @@ BI.Input = BI.inherit(BI.Single, { |
|
|
|
"leading": true, |
|
|
|
"leading": true, |
|
|
|
"trailing": false |
|
|
|
"trailing": false |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
this._focusDebounce = BI.debounce(BI.bind(this._focus, this), BI.EVENT_RESPONSE_TIME, { |
|
|
|
|
|
|
|
"leading": true, |
|
|
|
|
|
|
|
"trailing": false |
|
|
|
|
|
|
|
}); |
|
|
|
this._blurDebounce = BI.debounce(BI.bind(this._blur, this), BI.EVENT_RESPONSE_TIME, { |
|
|
|
this._blurDebounce = BI.debounce(BI.bind(this._blur, this), BI.EVENT_RESPONSE_TIME, { |
|
|
|
"leading": true, |
|
|
|
"leading": true, |
|
|
|
"trailing": false |
|
|
|
"trailing": false |
|
|
@ -9739,7 +9744,7 @@ BI.Input = BI.inherit(BI.Single, { |
|
|
|
.keydown(function (e) { |
|
|
|
.keydown(function (e) { |
|
|
|
inputEventValid = false; |
|
|
|
inputEventValid = false; |
|
|
|
ctrlKey = e.ctrlKey; |
|
|
|
ctrlKey = e.ctrlKey; |
|
|
|
self.fireEvent(BI.Input.EVENT_QUICK_DOWN); |
|
|
|
self.fireEvent(BI.Input.EVENT_QUICK_DOWN, arguments); |
|
|
|
}) |
|
|
|
}) |
|
|
|
.keyup(function (e) { |
|
|
|
.keyup(function (e) { |
|
|
|
if (!(inputEventValid && e.keyCode === BI.KeyCode.ENTER)) { |
|
|
|
if (!(inputEventValid && e.keyCode === BI.KeyCode.ENTER)) { |
|
|
@ -9762,6 +9767,9 @@ BI.Input = BI.inherit(BI.Single, { |
|
|
|
.mousedown(function (e) { |
|
|
|
.mousedown(function (e) { |
|
|
|
self.element.val(self.element.val()); |
|
|
|
self.element.val(self.element.val()); |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
.focus(function (e) { // 可以不用冒泡
|
|
|
|
|
|
|
|
self._focusDebounce(); |
|
|
|
|
|
|
|
}) |
|
|
|
.focusout(function (e) { |
|
|
|
.focusout(function (e) { |
|
|
|
self._blurDebounce(); |
|
|
|
self._blurDebounce(); |
|
|
|
}); |
|
|
|
}); |
|
|
@ -9809,7 +9817,6 @@ BI.Input = BI.inherit(BI.Single, { |
|
|
|
|
|
|
|
|
|
|
|
_click: function () { |
|
|
|
_click: function () { |
|
|
|
if (this._isEditing !== true) { |
|
|
|
if (this._isEditing !== true) { |
|
|
|
this._focus(); |
|
|
|
|
|
|
|
this.selectAll(); |
|
|
|
this.selectAll(); |
|
|
|
this.fireEvent(BI.Input.EVENT_CLICK); |
|
|
|
this.fireEvent(BI.Input.EVENT_CLICK); |
|
|
|
} |
|
|
|
} |
|
|
@ -9910,7 +9917,6 @@ BI.Input = BI.inherit(BI.Single, { |
|
|
|
} |
|
|
|
} |
|
|
|
if (!this._isEditing === true) { |
|
|
|
if (!this._isEditing === true) { |
|
|
|
this.element.focus(); |
|
|
|
this.element.focus(); |
|
|
|
this._focus(); |
|
|
|
|
|
|
|
this.selectAll(); |
|
|
|
this.selectAll(); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|