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

nested ScrollView onScroll event #5893

Closed
NoWay1201 opened this issue Feb 12, 2016 · 3 comments
Closed

nested ScrollView onScroll event #5893

NoWay1201 opened this issue Feb 12, 2016 · 3 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@NoWay1201
Copy link

Hello,

I got a problem in my Android application. I have ScrollView and inside it I got another ScrollView. And in my situation I need to Listed for Scroll in nested ScrollView (deeper one), but i can get onScroll event only from first ScrollView. Is that a bug or working properly? If it's working right - how can I do this?

Very simple example:

'use strict';
import React, {
  AppRegistry,
  Component,
  StyleSheet,
  Text,
  View,
  ScrollView
} from 'react-native';

class testScrollView extends Component {
  onScroll() {
    console.log('1');
  }
  onScroll2() {
    console.log('2');
  }
  render() {
    return (
      <ScrollView>
        <ScrollView onScroll={this.onScroll2} style={{padding: 15}}>
          <Text>
            Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce lobortis rhoncus augue, eget rutrum dui gravida id. Quisque efficitur, lectus iaculis aliquet eleifend, tellus turpis sollicitudin lorem, ornare sagittis libero nisl fringilla diam. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed facilisis et odio a varius. In non elementum orci. Quisque sollicitudin hendrerit lectus. Donec leo nisl, posuere ac accumsan quis, bibendum in libero. Ut gravida, velit in egestas eleifend, odio velit feugiat odio, ac volutpat dui odio sed sem. Quisque non sagittis ante, eu finibus turpis. Duis vel pharetra ante. Sed eu erat mauris.

Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. In dui lectus, accumsan et luctus et, consectetur in quam. Donec vel massa pulvinar, dictum augue vel, dictum elit. Suspendisse vestibulum lacus eget pellentesque volutpat. Quisque eu dolor ac tortor mollis lacinia. Pellentesque bibendum pellentesque nisi, quis ullamcorper est iaculis vel. Sed sit amet leo justo. Curabitur pharetra erat nec sagittis fermentum. Sed eu efficitur sapien, vel aliquam felis.

Aenean at consequat mi. Phasellus urna sem, scelerisque sit amet ex id, fermentum maximus lectus. Nunc nec ligula nulla. Phasellus vitae ligula nec ex cursus pretium. Nunc aliquam, sapien eget viverra mattis, lacus ex faucibus erat, eget interdum sem mauris id enim. Vivamus rhoncus semper ornare. Duis ut nisl velit. Phasellus ac mollis tellus. Donec accumsan sagittis lobortis. Morbi convallis orci nec lobortis elementum. Duis urna orci, sodales nec felis non, fermentum posuere velit. Donec tempus, nisl nec laoreet semper, nisi quam maximus ipsum, in varius nisi nunc eu elit. Phasellus iaculis arcu ligula, pretium vestibulum dui dapibus nec. Vestibulum in ipsum dolor.

In ac massa at lectus interdum finibus nec sed tortor. Praesent a sapien est. Suspendisse potenti. Donec ullamcorper purus turpis, nec feugiat elit pellentesque non. Quisque dapibus pellentesque odio, id posuere diam dictum quis. Vivamus elementum interdum augue, sed dignissim tellus congue non. Maecenas rutrum finibus eleifend. Nulla facilisi. Mauris dictum nisl vitae sapien molestie scelerisque. Proin dictum feugiat feugiat. Proin ex augue, pellentesque quis fringilla in, placerat ut mauris. Maecenas in odio ut purus sodales efficitur non nec tellus. Praesent rhoncus quis orci et sagittis. Quisque cursus ultrices mi eget viverra. Aliquam non volutpat nunc, et fringilla ante. Proin nunc nisi, ullamcorper at diam porttitor, ullamcorper elementum arcu.

Mauris mattis turpis eget dictum volutpat. Sed dignissim risus quis vehicula varius. Sed dignissim, ipsum ut tincidunt congue, leo leo tristique enim, a congue neque lacus eget enim. Ut ut varius felis, viverra volutpat ante. Cras vitae mi nulla. Nulla volutpat tortor tortor, quis euismod ante euismod sit amet. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Nullam nec magna sed felis lacinia fringilla eu vel dolor. Proin vestibulum, quam a finibus rutrum, urna justo sollicitudin lectus, nec malesuada nibh nisl in elit. Sed aliquam ante sapien, sed maximus sapien finibus non. Mauris ligula dui, commodo non dolor vitae, cursus elementum nisi. In maximus ac lorem vel laoreet. Ut volutpat quam tellus, vitae porta lacus mattis vitae. Morbi id dui a turpis interdum laoreet. Nullam condimentum eros augue, a faucibus augue aliquet at.
          </Text>
        </ScrollView>
      </ScrollView>
    );
  }
}

AppRegistry.registerComponent('testScrollView', () => testScrollView);
@facebook-github-bot
Copy link
Contributor

Hey NoWay1201, thanks for reporting this issue!

React Native, as you've probably heard, is getting really popular and truth is we're getting a bit overwhelmed by the activity surrounding it. There are just too many issues for us to manage properly.

  • If you don't know how to do something or something is not working as you expect but not sure it's a bug, please ask on StackOverflow with the tag react-native or for more real time interactions, ask on Discord in the #react-native channel.
  • If this is a feature request or a bug that you would like to be fixed, please report it on Product Pains. It has a ranking feature that lets us focus on the most important issues the community is experiencing.
  • We welcome clear issues and PRs that are ready for in-depth discussion. Please provide screenshots where appropriate and always mention the version of React Native you're using. Thank you for your contributions!

@alloy
Copy link
Contributor

alloy commented Jun 9, 2016

This is currently expected behaviour. See #8024.

@mkonicek
Copy link
Contributor

Hi there! This issue is being closed because it has been inactive for a while.

But don't worry, it will live on with ProductPains! Check out its new home: https://productpains.com/post/react-native/nested-scrollview-onscroll-event

Product Pains has been very useful in highlighting the top bugs and feature requests:
https://productpains.com/product/react-native?tab=top

Also, if this issue is a bug, please consider sending a pull request with a fix.

@facebook facebook locked as resolved and limited conversation to collaborators Jul 20, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 20, 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