From a3161038d90bfe5d02cebb21b45183c2f22e0cd1 Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Fri, 3 Dec 2021 15:06:34 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=20=E5=9B=9E?= =?UTF-8?q?=E6=BB=9A=E5=88=B0=E5=8E=9F=E6=9D=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/single/input/input.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/base/single/input/input.js b/src/base/single/input/input.js index 44605fc78..837d6d205 100644 --- a/src/base/single/input/input.js +++ b/src/base/single/input/input.js @@ -24,7 +24,7 @@ BI.Input = BI.inherit(BI.Single, { var _keydown = BI.debounce(function (keyCode) { self.onKeyDown(keyCode, ctrlKey); self._keydown_ = false; - }, BI.EVENT_RESPONSE_TIME); + }, 300); var _clk = BI.debounce(BI.bind(this._click, this), BI.EVENT_RESPONSE_TIME, { "leading": true, "trailing": false @@ -33,7 +33,10 @@ BI.Input = BI.inherit(BI.Single, { "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, + "trailing": false + }); this.element .keydown(function (e) { inputEventValid = false; @@ -92,7 +95,11 @@ BI.Input = BI.inherit(BI.Single, { _blur: function () { var self = this; - blur(); + if (self._keydown_ === true) { + BI.delay(blur, 300); + } else { + blur(); + } function blur () { if (!self.isValid() && self.options.quitChecker.apply(self, [BI.trim(self.getValue())]) !== false) { From 5cc1422f358b62f7ff926a9fe2c728c9a5714633 Mon Sep 17 00:00:00 2001 From: data Date: Fri, 3 Dec 2021 15:25:12 +0800 Subject: [PATCH 2/2] auto upgrade version to 2.0.20211203152451 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f3fafdda1..628919d8d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20211202090501", + "version": "2.0.20211203152451", "description": "fineui", "main": "dist/fineui.min.js", "types": "dist/lib/index.d.ts",