From ffdaeb5177dea6f5cc6fee8d70fc0f574879c6ba Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Thu, 18 Apr 2019 17:00:59 +0800 Subject: [PATCH 1/2] =?UTF-8?q?BI-41332=20feat:=20=E5=8F=B3=E9=94=AE?= =?UTF-8?q?=E7=B2=98=E8=B4=B4=E4=B8=8E=E8=BE=93=E5=85=A5=E6=B3=95=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E8=BE=93=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/single/input/input.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/base/single/input/input.js b/src/base/single/input/input.js index a60ad2286..dc45568ff 100644 --- a/src/base/single/input/input.js +++ b/src/base/single/input/input.js @@ -54,8 +54,10 @@ BI.Input = BI.inherit(BI.Single, { }) .on("input propertychange", function (e) { // 输入内容全选并直接删光,如果按键没放开就失去焦点不会触发keyup,被focusout覆盖了 - // 这个事件在input的属性发生改变的时候就会触发(class的变化也算) - if (BI.isNotNull(keyCode)) { + // 其中propertychange在元素属性发生改变的时候就会触发 是为了兼容IE8 + // 通过keyCode判断会漏掉右键粘贴和输入法点击输入 + var originalEvent = e.originalEvent; + if (BI.isNull(originalEvent.propertyName) || originalEvent.propertyName === "value") { keyCode = null; inputEventValid = true; self._keydown_ = true; From c859bccd73a6d70757756be9da6762b31cc4118a Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Thu, 18 Apr 2019 17:09:45 +0800 Subject: [PATCH 2/2] update --- src/base/single/input/input.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/base/single/input/input.js b/src/base/single/input/input.js index dc45568ff..bf301e15f 100644 --- a/src/base/single/input/input.js +++ b/src/base/single/input/input.js @@ -55,7 +55,7 @@ BI.Input = BI.inherit(BI.Single, { .on("input propertychange", function (e) { // 输入内容全选并直接删光,如果按键没放开就失去焦点不会触发keyup,被focusout覆盖了 // 其中propertychange在元素属性发生改变的时候就会触发 是为了兼容IE8 - // 通过keyCode判断会漏掉右键粘贴和输入法点击输入 + // 通过keyCode判断会漏掉输入法点击输入(右键粘贴暂缓) var originalEvent = e.originalEvent; if (BI.isNull(originalEvent.propertyName) || originalEvent.propertyName === "value") { keyCode = null;