From 568d625b7d8259ff07c609a68ae395defa3e918d Mon Sep 17 00:00:00 2001 From: Fritz Lin Date: Sat, 21 Oct 2017 11:28:35 +0800 Subject: [PATCH] fix(ie): take 'backspace' in ie9 textarea, ref #22 --- src/At.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/At.vue b/src/At.vue index 4e00b63..8e52a9c 100644 --- a/src/At.vue +++ b/src/At.vue @@ -167,8 +167,10 @@ export default { } } - const isChar = e.keyCode >= 48 && e.keyCode <= 90 - if (isChar) { + // 为了兼容ie ie9~11 editable无input事件 只能靠keydown触发 textarea正常 + // 另 ie9 textarea的delete不触发input + const isValid = e.keyCode >= 48 && e.keyCode <= 90 || e.keyCode === 8 + if (isValid) { setTimeout(() => { this.handleInput() }, 50)