Skip to content

Commit

Permalink
fix(content): scrolling Y
Browse files Browse the repository at this point in the history
  • Loading branch information
manucorporat committed Aug 10, 2018
1 parent aa23d08 commit 01323ac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
10 changes: 2 additions & 8 deletions core/src/components/content/content.scss
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@
overflow: hidden;
}

.scroll-x.scroll.y {
.scroll-y,
.scroll-x {
-webkit-overflow-scrolling: touch;
will-change: scroll-position;
}
Expand All @@ -67,13 +68,6 @@
overflow-x: auto;
}

.scroll-enabled {
overflow-x: hidden;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
will-change: scroll-position;
}

.overscroll::before,
.overscroll::after {
position: absolute;
Expand Down
4 changes: 1 addition & 3 deletions core/src/components/content/content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,6 @@ export class Content {

render() {
const { scrollX, scrollY, forceOverscroll } = this;
const scrollEnabled = scrollX || scrollY;

this.resize();

Expand All @@ -300,8 +299,7 @@ export class Content {
'inner-scroll': true,
'scroll-x': scrollX,
'scroll-y': scrollY,
'scroll-enabled': scrollEnabled,
'overscroll': scrollEnabled && !!forceOverscroll
'overscroll': (scrollX || scrollY) && !!forceOverscroll
}}
ref={el => this.scrollEl = el!}
onScroll={ev => this.onScroll(ev)}>
Expand Down

0 comments on commit 01323ac

Please sign in to comment.