diff --git a/examples/components/ScrollView/ScrollViewExample.js b/examples/components/ScrollView/ScrollViewExample.js index d56726a6..ac86e01a 100644 --- a/examples/components/ScrollView/ScrollViewExample.js +++ b/examples/components/ScrollView/ScrollViewExample.js @@ -1,6 +1,6 @@ import React from 'react'; import { storiesOf, action } from '@kadira/storybook'; -import { ScrollView, StyleSheet, Text, View } from 'react-native' +import { ScrollView, StyleSheet, Text, TouchableHighlight, View } from 'react-native' storiesOf('component: ScrollView', module) .add('vertical', () => ( @@ -13,7 +13,7 @@ storiesOf('component: ScrollView', module) > {Array.from({ length: 50 }).map((item, i) => ( - {i} + {}}>{i} ))} @@ -39,7 +39,6 @@ storiesOf('component: ScrollView', module) const styles = StyleSheet.create({ box: { - alignItems: 'center', flexGrow: 1, justifyContent: 'center', borderWidth: 1 diff --git a/src/components/View/index.js b/src/components/View/index.js index 45bc9ab1..055755cb 100644 --- a/src/components/View/index.js +++ b/src/components/View/index.js @@ -124,10 +124,10 @@ class View extends Component { _normalizeEventForHandler(handler, handlerName) { // Browsers fire mouse events after touch events. This causes the - // ResponderEvents and their handlers to fire twice for Touchables. + // 'onResponderRelease' handler to be called twice for Touchables. // Auto-fix this issue by calling 'preventDefault' to cancel the mouse // events. - const shouldCancelEvent = handlerName.indexOf('onResponder') === 0; + const shouldCancelEvent = handlerName === 'onResponderRelease'; return (e) => { e.nativeEvent = normalizeNativeEvent(e.nativeEvent);