File tree Expand file tree Collapse file tree 3 files changed +6
-7
lines changed
docs/src/components/ScrollView/examples
react-native-web/src/exports/ScrollView Expand file tree Collapse file tree 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() {
2727 } }
2828 />
2929 < Button
30- label = "Scroll to 200px "
30+ label = "Scroll to 50px "
3131 onPress = { ( ) => {
32- scrollRef . current . scrollTo ( { x : 200 } ) ;
32+ scrollRef . current . scrollTo ( { x : 50 } ) ;
3333 } }
3434 />
3535 < Button
Original file line number Diff line number Diff line change @@ -23,9 +23,9 @@ export default function Vertical() {
2323 } }
2424 />
2525 < Button
26- label = "Scroll to 200px "
26+ label = "Scroll to 50px "
2727 onPress = { ( ) => {
28- scrollRef . current . scrollTo ( { y : 200 } ) ;
28+ scrollRef . current . scrollTo ( { y : 50 } ) ;
2929 } }
3030 />
3131 < Button
Original file line number Diff line number Diff line change @@ -125,9 +125,6 @@ export default class ScrollViewBase extends React.Component<Props> {
125125 if ( handler ) {
126126 handler ( e ) ;
127127 }
128- } else {
129- // To disable scrolling in all browsers except Chrome
130- e . preventDefault ( ) ;
131128 }
132129 } ;
133130 } ;
@@ -185,6 +182,8 @@ export default class ScrollViewBase extends React.Component<Props> {
185182// https://developers.google.com/web/updates/2017/01/scrolling-intervention
186183const styles = StyleSheet . create ( {
187184 scrollDisabled : {
185+ overflowX : 'hidden' ,
186+ overflowY : 'hidden' ,
188187 touchAction : 'none'
189188 } ,
190189 hideScrollbar : {
You can’t perform that action at this time.
0 commit comments