Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chrome 49中select的backspce回退键的bug #6256

Closed
hello-undefined opened this issue Sep 10, 2019 · 0 comments
Closed

chrome 49中select的backspce回退键的bug #6256

hello-undefined opened this issue Sep 10, 2019 · 0 comments

Comments

@hello-undefined
Copy link

Environment

Windows XP Professional SP3 / Chrome 49.0.2623.112 / iView 2.8.0 / vue 2.5.13

Reproduction link

https://www.iviewui.com/components/select

Steps to reproduce

1、输入123456
2、按Backspace键删除,

What is expected?

显示12345

What is actually happening?

删除不了


但是 如果先用鼠标点击一下select组件,再按Backspace可以删除一个,再用鼠标点击一下select组件,可以再删除一个

看了源码后,进行调试,发现这段的代码中,在chrome49中e.key返回的是undefined
if (e.key === "Backspace") {
return; // so we don't call preventDefault
}

解决方案:
e.key = e.key || e.code;
if (e.key === "Backspace") {
return; // so we don't call preventDefault
}

(PS:试过好几个iview版本发现这个问题都没有解决,包括3.2.1以及3.4.2)

DebugIsFalse added a commit that referenced this issue Sep 11, 2019
icarusion added a commit to view-design/ViewUI that referenced this issue Oct 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants