Skip to content

Commit

Permalink
修复低版本浏览器select组件在搜索时,按下backspace无法正确删除搜索关键字
Browse files Browse the repository at this point in the history
  • Loading branch information
qinzhou committed May 28, 2020
1 parent 8a994e6 commit 3b0bff7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/select/select.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 3b0bff7

Please sign in to comment.