File tree 3 files changed +6
-7
lines changed
docs/src/components/ScrollView/examples
react-native-web/src/exports/ScrollView
3 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -27,9 +27,9 @@ export default function Horizontal() {
27
27
} }
28
28
/>
29
29
< Button
30
- label = "Scroll to 200px "
30
+ label = "Scroll to 50px "
31
31
onPress = { ( ) => {
32
- scrollRef . current . scrollTo ( { x : 200 } ) ;
32
+ scrollRef . current . scrollTo ( { x : 50 } ) ;
33
33
} }
34
34
/>
35
35
< Button
Original file line number Diff line number Diff line change @@ -23,9 +23,9 @@ export default function Vertical() {
23
23
} }
24
24
/>
25
25
< Button
26
- label = "Scroll to 200px "
26
+ label = "Scroll to 50px "
27
27
onPress = { ( ) => {
28
- scrollRef . current . scrollTo ( { y : 200 } ) ;
28
+ scrollRef . current . scrollTo ( { y : 50 } ) ;
29
29
} }
30
30
/>
31
31
< Button
Original file line number Diff line number Diff line change @@ -125,9 +125,6 @@ export default class ScrollViewBase extends React.Component<Props> {
125
125
if ( handler ) {
126
126
handler ( e ) ;
127
127
}
128
- } else {
129
- // To disable scrolling in all browsers except Chrome
130
- e . preventDefault ( ) ;
131
128
}
132
129
} ;
133
130
} ;
@@ -185,6 +182,8 @@ export default class ScrollViewBase extends React.Component<Props> {
185
182
// https://developers.google.com/web/updates/2017/01/scrolling-intervention
186
183
const styles = StyleSheet . create ( {
187
184
scrollDisabled : {
185
+ overflowX : 'hidden' ,
186
+ overflowY : 'hidden' ,
188
187
touchAction : 'none'
189
188
} ,
190
189
hideScrollbar : {
You can’t perform that action at this time.
0 commit comments