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

slate 中文输入后如触发 rerender 会导致输入焦点改变位置 #8

Open
chemzqm opened this issue Jul 21, 2017 · 0 comments
Labels

Comments

@chemzqm
Copy link
Owner

chemzqm commented Jul 21, 2017

如果使用 DOM api 修改 dom 样式,react 会在中文输入后触发重渲染,然后改变焦点位置(应该算是 react 的 bug),解决办法就是避免使用 DOM api 修改 react 组件样式,通过改变并保存 state 来确定组件样式。

@chemzqm chemzqm changed the title Slate 中文输入后如触发 rerender 会导致输入焦点下移 slate 中文输入后如触发 rerender 会导致输入焦点下移 Jul 21, 2017
@chemzqm chemzqm changed the title slate 中文输入后如触发 rerender 会导致输入焦点下移 slate 中文输入后如触发 rerender 会导致输入焦点改变位置 Jul 24, 2017
@chemzqm chemzqm added the Slate label Jul 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant