Reduce code duplication, add touch scrolling behaviour for webkit browsers

on scrollable areas
master
Eugen Rochko 8 years ago
parent 98c3a5e9c3
commit 6d5ef89356
  1. 2
      app/assets/javascripts/components/components/status_list.jsx
  2. 2
      app/assets/javascripts/components/features/followers/index.jsx
  3. 2
      app/assets/javascripts/components/features/following/index.jsx
  4. 2
      app/assets/javascripts/components/features/reblogs/index.jsx
  5. 2
      app/assets/javascripts/components/features/status/index.jsx
  6. 7
      app/assets/stylesheets/components.scss

@ -47,7 +47,7 @@ const StatusList = React.createClass({
const { statusIds, onScrollToBottom, trackScroll } = this.props;
const scrollableArea = (
<div style={{ overflowY: 'scroll', flex: '1 1 auto', overflowX: 'hidden' }} className='scrollable' onScroll={this.handleScroll}>
<div className='scrollable' onScroll={this.handleScroll}>
<div>
{statusIds.map((statusId) => {
return <StatusContainer key={statusId} id={statusId} now={this.state.now} />;

@ -39,7 +39,7 @@ const Followers = React.createClass({
return (
<ScrollContainer scrollKey='followers'>
<div style={{ overflowY: 'scroll', flex: '1 1 auto', overflowX: 'hidden' }} className='scrollable'>
<div className='scrollable'>
{accountIds.map(id => <AccountContainer key={id} id={id} withNote={false} />)}
</div>
</ScrollContainer>

@ -39,7 +39,7 @@ const Following = React.createClass({
return (
<ScrollContainer scrollKey='following'>
<div style={{ overflowY: 'scroll', flex: '1 1 auto', overflowX: 'hidden' }} className='scrollable'>
<div className='scrollable'>
{accountIds.map(id => <AccountContainer key={id} id={id} withNote={false} />)}
</div>
</ScrollContainer>

@ -48,7 +48,7 @@ const Reblogs = React.createClass({
<ColumnBackButton />
<ScrollContainer scrollKey='reblogs'>
<div style={{ overflowY: 'scroll', flex: '1 1 auto', overflowX: 'hidden' }} className='scrollable'>
<div className='scrollable'>
{accountIds.map(id => <AccountContainer key={id} id={id} withNote={false} />)}
</div>
</ScrollContainer>

@ -114,7 +114,7 @@ const Status = React.createClass({
<ColumnBackButton />
<ScrollContainer scrollKey='thread'>
<div style={{ overflowY: 'scroll', flex: '1 1 auto' }} className='scrollable'>
<div className='scrollable'>
{ancestors}
<DetailedStatus status={status} me={me} onOpenMedia={this.handleOpenMedia} />

@ -295,3 +295,10 @@
background: #2b90d9;
color: #fff;
}
.scrollable {
overflow-y: scroll;
overflow-x: hidden;
flex: 1 1 auto;
-webkit-overflow-scrolling: touch;
}

Loading…
Cancel
Save