Skip to content

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.

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

2 participants