File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -99,7 +99,12 @@ class ScrollableTabs extends Component {
9999
100100
101101 _onScroll ( e ) {
102- if ( ! this . _scrolling ) return ;
102+ const { contentSize= { } } = e . nativeEvent ;
103+
104+ // 一下一行代码为解决一个奇葩的bug
105+ if ( contentSize . height === 0 && contentSize . width === 0 ) return ;
106+
107+
103108 const { x} = e . nativeEvent . contentOffset ;
104109 this . _scrolling = true ;
105110 this . _animateScroll ( x ) ;
Original file line number Diff line number Diff line change @@ -23,9 +23,7 @@ class Home extends Component {
2323 const { actions, topic, ui} = this . props ;
2424 const tab = Tabs . tabs [ page ] ;
2525 if ( topic [ tab ] && ui [ tab ] && ! ui [ tab ] . flag ) {
26- setTimeout ( ( ) => {
27- ! isScrolling ( ) && actions . updateTopicsByTab ( tab ) ;
28- } , 16 ) ;
26+ actions . updateTopicsByTab ( tab ) ;
2927 }
3028 }
3129
You can’t perform that action at this time.
0 commit comments