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#3000 and Fix inputItem make Picker unable to click in Wechat with IOS12; #3017

Merged
merged 2 commits into from
Mar 20, 2019
Merged
Show file tree
Hide file tree
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
7 changes: 7 additions & 0 deletions components/input-item/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,13 @@ class InputItem extends React.Component<InputItemProps, any> {
}, 200);
}
if (this.props.onBlur) {
// fix autoFocus item blur with flash
setTimeout(() => {
// fix ios12 wechat browser click failure after input
if (document.body) {
document.body.scrollTop = document.body.scrollTop;
}
},100);
this.props.onBlur(value);
}
}
Expand Down
7 changes: 7 additions & 0 deletions components/search-bar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,13 @@ export default class SearchBar extends React.Component<
this.blurFromOnClear = false;
});
if (this.props.onBlur) {
// fix autoFocus item blur with flash
setTimeout(() => {
// fix ios12 wechat browser click failure after input
if (document.body) {
document.body.scrollTop = document.body.scrollTop;
}
},100);
this.props.onBlur();
}
}
Expand Down
7 changes: 7 additions & 0 deletions components/textarea-item/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,13 @@ export default class TextareaItem extends React.Component<
}, 100);
const value = e.currentTarget.value;
if (this.props.onBlur) {
// fix autoFocus item blur with flash
setTimeout(() => {
// fix ios12 wechat browser click failure after input
if (document.body) {
document.body.scrollTop = document.body.scrollTop;
}
},100);
this.props.onBlur(value);
}
}
Expand Down