From 53ead60e28fc918e0ccb71e1adf65ae7eaf66690 Mon Sep 17 00:00:00 2001 From: qcc Date: Tue, 11 Sep 2018 10:22:50 +0800 Subject: [PATCH] =?UTF-8?q?fix=E5=9C=A8=E8=BE=93=E5=85=A5=E6=A1=86?= =?UTF-8?q?=E6=8C=89=E4=B8=8Btab=E9=94=AE=EF=BC=8Cwatermark=E6=B6=88?= =?UTF-8?q?=E5=A4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/single/editor/editor.js | 5 +++-- src/base/single/input/input.js | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/base/single/editor/editor.js b/src/base/single/editor/editor.js index 14a7dc4e5c..d76838265c 100644 --- a/src/base/single/editor/editor.js +++ b/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 () { diff --git a/src/base/single/input/input.js b/src/base/single/input/input.js index e3bc8367c1..dc59b08a91 100644 --- a/src/base/single/input/input.js +++ b/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)) {