react-native icon indicating copy to clipboard operation
react-native copied to clipboard

RefreshControl blocks onScrollEndDrag events

Open maxim-c opened this issue 10 years ago • 6 comments

On Android when scrolling to 0 offset refresh control starting mounting, and scrolling stops, you can't even scroll again with current touch, but events(onScrollEndDrag) not triggered. If you poll down enough you surely get triggered 'onRefresh' event from 'RefreshControl' where you can at least know that offset is 0, but if you don't poll enough... Maybe there any workaround, or i'm missing something?

handleScrollEndEvents(e){
  console.log(e)
}
render() {
  return(
    <ListView
      ref={(c) => this._list = c}
      refreshControl={
        <RefreshControl
          refreshing={this.state.isRefreshing}
          onRefresh={this._onRefresh}
        />
      }
      onMomentumScrollEnd={this.handleScrollEndEvents}
      onScrollEndDrag={this.handleScrollEndEvents}
    />
  )
}

maxim-c avatar Aug 12 '16 12:08 maxim-c

@facebook-github-bot label Android

rmevans9 avatar Aug 12 '16 17:08 rmevans9

@facebook-github-bot label Icebox

charpeni avatar Nov 14 '16 02:11 charpeni

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/refreshcontrol-blocks-onscrollenddrag-events

ProductPains helps the community prioritize the most important issues thanks to its voting feature. It is easy to use - just login with GitHub.

Also, if this issue is a bug, please consider sending a PR with a fix. We're a small team and rely on the community for bug fixes of issues that don't affect fb apps.

charpeni avatar Nov 14 '16 02:11 charpeni

@facebook-github-bot close

charpeni avatar Nov 14 '16 02:11 charpeni

@charpeni tells me to close this issue. If you think it should still be opened let us know why.

facebook-github-bot avatar Nov 14 '16 02:11 facebook-github-bot

Given e an event coming from an async action, console.log(e) messes up the log system and the IDE might get stuck afterwards, preventing from seeing any further logs and / or a dump of never ending log nonsense, due to the massive content of the event object. Your simulator might freeze as well, so I strongly suggest to avoid doing so. Your issue could be simply related to this. Try to use console.log(!!e) instead, or try logging other meaningful but reasonably smaller properties of the event object itself.

raynor85 avatar Dec 31 '17 01:12 raynor85