From 6d8f9f9dfdecfbea553992e87d938f86b28db002 Mon Sep 17 00:00:00 2001 From: Jakub Kosmydel <104823336+kosmydel@users.noreply.github.com> Date: Sun, 13 Aug 2023 16:04:25 +0200 Subject: [PATCH 1/3] Add overscrollContain style --- src/components/InvertedFlatList/index.js | 1 + src/styles/styles.js | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/components/InvertedFlatList/index.js b/src/components/InvertedFlatList/index.js index 923a17210af7..fee37a9c1514 100644 --- a/src/components/InvertedFlatList/index.js +++ b/src/components/InvertedFlatList/index.js @@ -43,6 +43,7 @@ class InvertedFlatList extends React.Component { ref={(el) => (this.list = el)} shouldMeasureItems contentContainerStyle={StyleSheet.compose(this.props.contentContainerStyle, styles.justifyContentEnd)} + style={styles.overscrollContain} /> ); } diff --git a/src/styles/styles.js b/src/styles/styles.js index 581410e0e5a5..c9de6658a84e 100644 --- a/src/styles/styles.js +++ b/src/styles/styles.js @@ -3677,6 +3677,10 @@ const styles = { rotate90: { transform: [{rotate: '90deg'}], }, + + overscrollContain: { + overscrollBehavior: 'contain', + }, }; export default styles; From 46666557d14ce2d3f32a716145d5030b5339e876 Mon Sep 17 00:00:00 2001 From: Jakub Kosmydel <104823336+kosmydel@users.noreply.github.com> Date: Tue, 15 Aug 2023 08:21:47 +0200 Subject: [PATCH 2/3] Move style to the overflow.js --- src/components/InvertedFlatList/index.js | 2 +- src/styles/styles.js | 4 ---- src/styles/utilities/overflow.js | 4 ++++ 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/InvertedFlatList/index.js b/src/components/InvertedFlatList/index.js index fee37a9c1514..505fec32ddbd 100644 --- a/src/components/InvertedFlatList/index.js +++ b/src/components/InvertedFlatList/index.js @@ -43,7 +43,7 @@ class InvertedFlatList extends React.Component { ref={(el) => (this.list = el)} shouldMeasureItems contentContainerStyle={StyleSheet.compose(this.props.contentContainerStyle, styles.justifyContentEnd)} - style={styles.overscrollContain} + style={styles.overscrollBehaviorContain} /> ); } diff --git a/src/styles/styles.js b/src/styles/styles.js index aa952358e0b7..174662ed1d29 100644 --- a/src/styles/styles.js +++ b/src/styles/styles.js @@ -3676,10 +3676,6 @@ const styles = { rotate90: { transform: [{rotate: '90deg'}], }, - - overscrollContain: { - overscrollBehavior: 'contain', - }, }; export default styles; diff --git a/src/styles/utilities/overflow.js b/src/styles/utilities/overflow.js index c190abfa912b..9b7f92cd156f 100644 --- a/src/styles/utilities/overflow.js +++ b/src/styles/utilities/overflow.js @@ -22,5 +22,9 @@ export default { overscrollBehavior: 'none', }, + overscrollBehaviorContain: { + overscrollBehavior: 'contain', + }, + overflowAuto, }; From d90968188ffcc7bbf765b737c07653f29e5341e0 Mon Sep 17 00:00:00 2001 From: Jakub Kosmydel <104823336+kosmydel@users.noreply.github.com> Date: Mon, 21 Aug 2023 15:49:14 +0200 Subject: [PATCH 3/3] Refactor, use platform-specific styles --- src/components/InvertedFlatList/index.js | 1 - src/pages/home/report/ReportActionsList.js | 1 + src/styles/utilities/overflow.js | 5 ++--- src/styles/utilities/overscrollBehaviorContain/index.js | 3 +++ .../utilities/overscrollBehaviorContain/index.native.js | 1 + 5 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 src/styles/utilities/overscrollBehaviorContain/index.js create mode 100644 src/styles/utilities/overscrollBehaviorContain/index.native.js diff --git a/src/components/InvertedFlatList/index.js b/src/components/InvertedFlatList/index.js index 505fec32ddbd..923a17210af7 100644 --- a/src/components/InvertedFlatList/index.js +++ b/src/components/InvertedFlatList/index.js @@ -43,7 +43,6 @@ class InvertedFlatList extends React.Component { ref={(el) => (this.list = el)} shouldMeasureItems contentContainerStyle={StyleSheet.compose(this.props.contentContainerStyle, styles.justifyContentEnd)} - style={styles.overscrollBehaviorContain} /> ); } diff --git a/src/pages/home/report/ReportActionsList.js b/src/pages/home/report/ReportActionsList.js index 7f897ee825fb..4ef607e638c6 100644 --- a/src/pages/home/report/ReportActionsList.js +++ b/src/pages/home/report/ReportActionsList.js @@ -291,6 +291,7 @@ function ReportActionsList({