schovi / react-iscroll

React component for wrapping iScroll http://iscrolljs.com/
MIT License
236 stars 60 forks source link

horizontal scroll fail #61

Closed terminalqo closed 7 years ago

terminalqo commented 7 years ago

In this photogallary , I put 3 pics in it, and I use react-scroll in horizontal scroll. it works. but when I put my finger on scroll area and scroll up and down , body`s scroll fail. I was wondering if someone could help me. thanks!!

<ReactIScroll iScroll={iScroll}
       options={{scrollbars: false, scrollX: true, }}>
    <div style={{width:`${pics.length * 2.6}rem`}}>
       <ul>
            {
               pics.map((i,index) => {
                   return (
                        <Tappable
                             onTap={() => this.onTap(i,pics)}
                             key={index}
                             moveThreshold={10}
                           >
                            <img
                            src={`${i}/200`}
                            key={index}
                            style={{width:"2.4rem",height:"1.49rem",marginLeft:"0.1rem"}}
                             />
              </Tappable>
            )
          })
         }
   </ul>
  </div>
</ReactIScroll>

tim 20170702191713

terminalqo commented 7 years ago

fixed , https://github.com/cubiq/iscroll/issues/857