Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ScrollView] Sticky Headers do not handle gestures properly #1482

Closed
shayne opened this issue Jun 1, 2015 · 5 comments
Closed

[ScrollView] Sticky Headers do not handle gestures properly #1482

shayne opened this issue Jun 1, 2015 · 5 comments
Assignees
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@shayne
Copy link
Contributor

shayne commented Jun 1, 2015

[RCTScrollView] Make ScrollView detect taps on sticky headers #1415 had an unintentional side affect that prevents gestures from being passed to the appropriate parents of a sticky headers.

Prior to #1415, the header would work as expected, but suffered from not being able to receive touches once docked.

Example:

A sticky header with a horizontal scroll view that contains TouchableHighlights. Note how you can still achieve a tap on the items in the scroll view but scrolling does not work.

  _renderSectionHeader() {
    var views = [];
    for (var i=0; i<10; ++i) {
      ((i) => {
        views.push(
          <TouchableHighlight onPress={() => this._onPress('header: ' + i)}>
            <View
              key   = {i}
              style = {{backgroundColor: 'yellow', width: 50, height: 50, margin: 10, alignItems: 'center', justifyContent: 'center'}}>
              <Text>{i}</Text>
            </View>
          </TouchableHighlight>
        );
      })(i)
    }
    return (
      <ScrollView style={{backgroundColor: 'blue'}} horizontal={true}>
        {views}
      </ScrollView>
    );
  },
@shayne shayne changed the title [RCTScrollView] [Regression] Sticky Headers do not handle gestures properly [RCTScrollView] Sticky Headers do not handle gestures properly Jun 1, 2015
@shayne shayne added this to the 0.5.1 milestone Jun 1, 2015
@brentvatne brentvatne changed the title [RCTScrollView] Sticky Headers do not handle gestures properly [ScrollView] Sticky Headers do not handle gestures properly Jun 1, 2015
@brentvatne
Copy link
Collaborator

@nicklockwood - any tips on how I can fix this?

@brentvatne
Copy link
Collaborator

Sorry I didn't get around to this, will try to sometime in the next week

@shayne
Copy link
Contributor Author

shayne commented Jun 18, 2015

That would be awesome! Thanks @brentvatne

@ashleydw
Copy link

+1 any news?

@ide
Copy link
Contributor

ide commented Aug 15, 2015

Should be fixed by #2224 / please reopen if otherwise.

@ide ide closed this as completed Aug 15, 2015
@facebook facebook locked as resolved and limited conversation to collaborators Jul 22, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

5 participants