From faec2b4a833351eef27b45c88075d647ebe86cee Mon Sep 17 00:00:00 2001 From: Nicolas Gallagher Date: Thu, 13 Jul 2017 17:10:38 -0700 Subject: [PATCH] [fix] ScrollView to use 'touch-action' to disable scroll The recommendation from the Chrome team is to use 'touch-action' to disable scrolling (via touch modality) when passive event listeners are in use. Close #563 --- .../ScrollView/examples/ScrollTo.js | 10 ++- .../storybook/1-components/View/ViewScreen.js | 5 ++ src/components/ScrollView/ScrollViewBase.js | 62 ++++++++----------- src/components/View/ViewStylePropTypes.js | 1 + 4 files changed, 40 insertions(+), 38 deletions(-) diff --git a/docs/storybook/1-components/ScrollView/examples/ScrollTo.js b/docs/storybook/1-components/ScrollView/examples/ScrollTo.js index 0aba8d99..6b1c49d6 100644 --- a/docs/storybook/1-components/ScrollView/examples/ScrollTo.js +++ b/docs/storybook/1-components/ScrollView/examples/ScrollTo.js @@ -5,7 +5,7 @@ */ import React, { PureComponent } from 'react'; -import { Button, ScrollView, StyleSheet, Text, View } from 'react-native'; +import { Button, ScrollView, StyleSheet, Text, TouchableHighlight, View } from 'react-native'; export default class ScrollToExample extends PureComponent { render() { @@ -20,11 +20,15 @@ export default class ScrollToExample extends PureComponent { style={styles.scrollViewStyle} > {Array.from({ length: 50 }).map((item, i) => - + {}} + style={[styles.box, styles.horizontalBox]} + > {i} - + )}