Skip to content

Commit

Permalink
fix(RCTScrollView): move scrolling logic back to host element
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentriemer committed Sep 14, 2018
1 parent c500634 commit d629031
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/react-native-dom/ReactDom/views/RCTScrollView.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ class RCTScrollView extends RCTView {
this.manager = bridge.uiManager;

this.updateHostStyle("contain", "strict");
this.updateChildContainerStyle("contain", "style size");

if (!this.hasScrollParent()) {
this.updateHostStyle("overscrollBehavior", "contain");
Expand All @@ -228,7 +229,7 @@ class RCTScrollView extends RCTView {
this._scrollEnabled = true;

if (isSafari) {
this.updateChildContainerStyle("willChange", "transform");
this.addWillChange("transform");
}

this.addEventListener("scroll", this.handleScroll, SCROLL_LISTENER_OPTIONS);
Expand Down Expand Up @@ -310,7 +311,7 @@ class RCTScrollView extends RCTView {
styleUpdate.overflowY = "hidden";
}

this.updateChildContainerStyle(styleUpdate);
this.updateHostStyle(styleUpdate);
}

calculateChildFramesData() {
Expand Down

0 comments on commit d629031

Please sign in to comment.