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: Bug with scrollbars on iOS 13+ #413

Merged
merged 1 commit into from
Apr 18, 2022
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
6 changes: 6 additions & 0 deletions src/components/hv-view/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,12 @@ export default class HvView extends PureComponent<HvComponentProps> {
props.showsHorizontalScrollIndicator = horizontal && showScrollIndicator;
props.showsVerticalScrollIndicator = !horizontal && showScrollIndicator;

// Fix scrollbar rendering issue in iOS 13+
// https://github.com/facebook/react-native/issues/26610#issuecomment-539843444
if (Platform.OS === 'ios' && parseInt(Platform.Version, 10) >= 13) {
props.scrollIndicatorInsets = { right: 1 };
}

if (horizontal) {
props.horizontal = true;
}
Expand Down
6 changes: 6 additions & 0 deletions src/components/hv-view/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,11 @@ export type InternalProps = {|
style?: ?Array<StyleSheet>,
testID?: ?string,
children?: ?any,
scrollIndicatorInsets?: {
bottom?: number,
left?: number,
right?: number,
top?: number,
},
stickyHeaderIndices?: ?(number[]),
|};