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

confirm: fix fast click input cannot get beyboard instantly #3420

Open
wants to merge 2 commits into
base: v2
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions src/components/confirm/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,20 @@ export default {
if (val) {
if (this.showInput) {
this.msg = ''
setTimeout(() => {
const str = navigator.userAgent.toLowerCase()
const isIOS = str.match(/cpu iphone os (.*?) like mac os/)
if (!isIOS || parseInt(isIOS[1]) < 11) { // 非IOS系统及IOS版本小于11
setTimeout(() => {
if (this.$refs.input) {
this.setInputFocus()
}
}, 300)
return
} else {
if (this.$refs.input) {
this.setInputFocus()
}
}, 300)
}
}
this.$emit('on-show') // emit just after msg is cleared
}
Expand Down