ldn0x7dc / react-native-gallery

A pure JavaScript image gallery component for react-native apps with common gestures like pan, pinch and doubleTap, supporting both iOS and Android.
331 stars 116 forks source link

安卓下这个插件加在modal时,在滚动未完成,按返回或其他操作卸载modal,应用闪退!crash when press back button to close modal while scrolling in android #32

Open waynehong opened 7 years ago

waynehong commented 7 years ago

安卓下这个插件加在modal时,在滚动未完成,按返回或其他操作卸载modal,应用闪退!

undefined is not an object(evaluating 'this.refs['innerListView'].scrollTo')

ViewPager.js:61 computeScrollOffset Scroller.js:203 callTimer JSTimerExecution.js:97 ......
vivekparekh8 commented 7 years ago

@waynehong I am also getting this issue. did you find any solution?

waynehong commented 7 years ago

@vivekparekh8 yes,you need to check whether this.refs['innerListView'] exist or not, at node_modules -> @Idn0x7dc -> react-native-view-pager -> library -> ViewPager.js .line 61.

if(!this.refs['innerListView']){ }else{ this.refs['innerListView'].scrollTo({x: curX, animated: false}); }