Browse Source

fix在输入框按下tab键,watermark消失

es6
qcc 6 years ago
parent
commit
53ead60e28
  1. 5
      src/base/single/editor/editor.js
  2. 2
      src/base/single/input/input.js

5
src/base/single/editor/editor.js

@ -120,8 +120,9 @@ BI.Editor = BI.inherit(BI.Single, {
this.editor.on(BI.Input.EVENT_KEY_DOWN, function (v) {
self.fireEvent(BI.Editor.EVENT_KEY_DOWN, arguments);
});
this.editor.on(BI.Input.EVENT_QUICK_DOWN, function (v) {
self.watermark && self.watermark.invisible();
this.editor.on(BI.Input.EVENT_QUICK_DOWN, function (e) {
// tab键就不要隐藏了
self.watermark && e.keyCode !== 9 && self.watermark.invisible();
});
this.editor.on(BI.Input.EVENT_VALID, function () {

2
src/base/single/input/input.js

@ -37,7 +37,7 @@ BI.Input = BI.inherit(BI.Single, {
.keydown(function (e) {
inputEventValid = false;
ctrlKey = e.ctrlKey;
self.fireEvent(BI.Input.EVENT_QUICK_DOWN);
self.fireEvent(BI.Input.EVENT_QUICK_DOWN, arguments);
})
.keyup(function (e) {
if (!(inputEventValid && e.keyCode === BI.KeyCode.ENTER)) {

Loading…
Cancel
Save