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

fix: 修复部分情况keypress不触发,导致输入异常的问题 #4745

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

TGuoW
Copy link
Contributor

@TGuoW TGuoW commented Aug 20, 2022

No description provided.

@TGuoW
Copy link
Contributor Author

TGuoW commented Aug 23, 2022

原因是 中文输入法 下输入特殊字符,keypress 事件不会触发,因此改成用 input 事件实现输入。

ps. 虽然70+版本的chrome已经支持 beforeinput,但无法在 beforeinput 事件内 preventDefault,因此放弃在这些浏览器内使用 beforeinput

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

Successfully merging this pull request may close these issues.

低版本浏览器输入标点符号等特殊字符后,再输入中文光标错乱
1 participant