mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-05-28 08:34:31 +00:00
[fix] ScrollView disabling of scroll
Make sure 'scrollEnabled={false}' works on desktop browsers and no longer
relies on using 'e.preventDefault()'.
Fix #1491
This commit is contained in:
@@ -27,9 +27,9 @@ export default function Horizontal() {
|
||||
}}
|
||||
/>
|
||||
<Button
|
||||
label="Scroll to 200px"
|
||||
label="Scroll to 50px"
|
||||
onPress={() => {
|
||||
scrollRef.current.scrollTo({ x: 200 });
|
||||
scrollRef.current.scrollTo({ x: 50 });
|
||||
}}
|
||||
/>
|
||||
<Button
|
||||
|
||||
@@ -23,9 +23,9 @@ export default function Vertical() {
|
||||
}}
|
||||
/>
|
||||
<Button
|
||||
label="Scroll to 200px"
|
||||
label="Scroll to 50px"
|
||||
onPress={() => {
|
||||
scrollRef.current.scrollTo({ y: 200 });
|
||||
scrollRef.current.scrollTo({ y: 50 });
|
||||
}}
|
||||
/>
|
||||
<Button
|
||||
|
||||
Reference in New Issue
Block a user