Merge pull request #512 from qinzhou/master

修复低版本浏览器select组件在搜索时,按下backspace无法正确删除搜索关键字
This commit is contained in:
Aresn 2020-06-23 16:29:11 +08:00 committed by GitHub
commit 3a398ab371
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -597,7 +597,8 @@
},
handleKeydown (e) {
const key = e.key || e.code;
if (key === 'Backspace'){
const keyCode = e.keyCode || e.which;
if (key === 'Backspace' || keyCode===8){
return; // so we don't call preventDefault
}