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: Keyboard not showing up on iOS when focus #545
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/react-component/select/c55a7zewm |
Codecov Report
@@ Coverage Diff @@
## master #545 +/- ##
=======================================
Coverage 99.37% 99.37%
=======================================
Files 20 20
Lines 955 956 +1
Branches 321 320 -1
=======================================
+ Hits 949 950 +1
Misses 5 5
Partials 1 1
Continue to review full report at Codecov.
|
测一下 IE11 的 onFocus。 |
@kermit-xuan @afc163 |
This is not work in IE 11.
I think we won't resolve problem, the reason is in ant-design/ant-design#26648 (comment) @afc163 What do you think? |
Using click event is a accepted way for both desktop and mobile devices. |
I try this example in IE11. You can try it again in IE11. |
event.preventDefault(); | ||
} | ||
const onClick = ({ target }) => { | ||
if (target !== inputRef.current) { | ||
// Should focus input if click the selector | ||
const isIE = (document.body.style as any).msTouchAction !== undefined; | ||
if (isIE) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我在 IE11 下测试,不加这个 hack,IE 也能触发了。
也就是说完全回到 #513 修改前的状态也能触发 focus 了,见鬼。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
先这样吧,遇到反馈再说。
close #26648
@afc163
发现是这次提交导致的问题:ed63549
我看你把 focus 从
onClick
挪到了onMouseDown
中,这导致在 IOS 上无法正常聚焦调起键盘,我又放回在onClick
中了,你看看有什么问题?