Skip to content

Workaround for React-Native bug with multiple RCTRootView#1618

Merged
gran33 merged 1 commit into
masterfrom
buttons_in_scrollview_not_clickable
Aug 2, 2017
Merged

Workaround for React-Native bug with multiple RCTRootView#1618
gran33 merged 1 commit into
masterfrom
buttons_in_scrollview_not_clickable

Conversation

@gran33
Copy link
Copy Markdown
Contributor

@gran33 gran33 commented Aug 2, 2017

@gran33
Copy link
Copy Markdown
Contributor Author

gran33 commented Aug 2, 2017

This bugFix is a workaround limbo case in react-native when the using multiple RCTRootView.

The bug description:
Having bottom tabs (tab bar) with 2 tabs (at least).
In tab #1 having ScrollView and perform scroll. While the scrolling is still in progress (haven't stopped yet) switch tab #2. Back to tab #1 and try to click on any button in the ScrollView. They aren't clickable (the native get this event but the JS block the app from getting it).
In order to get out of this limbo case, simply scroll with momentum and wait the ScrollView to stop. Now the buttons are clickable.

The fix traverse the view hierarchy tree in viewDidDisappear and invoke scrollViewDidEndDecelerating: for every ScrollView in hierarchy.

@gran33 gran33 merged commit 70f46f5 into master Aug 2, 2017
@gran33 gran33 deleted the buttons_in_scrollview_not_clickable branch August 2, 2017 11:07
@gran33 gran33 changed the title walk-around for React-Native bug with multiple RCTRootView work-around for React-Native bug with multiple RCTRootView Aug 3, 2017
@gran33 gran33 changed the title work-around for React-Native bug with multiple RCTRootView workaround for React-Native bug with multiple RCTRootView Aug 3, 2017
@gran33 gran33 changed the title workaround for React-Native bug with multiple RCTRootView Workaround for React-Native bug with multiple RCTRootView Aug 3, 2017
timxyz pushed a commit to 3sidedcube/react-native-navigation that referenced this pull request Aug 3, 2017
* master: (95 commits)
  Update styling-the-navigator.md
  Support statusBarTextColorScheme on Android
  Remove depreciated createJSModules @OverRide marker (wix#1628)
  Fix crash with scrollViewDidEndDecelerating and RCTTextView (wix#1630)
  Center title when setting title dynamically
  update docs for iOS drawer animations in top-level-api section (wix#1619)
  walk-around for React-Native bug with multiple RCTRootView (wix#1618)
  Send initial screen appear event after it's displayed
  Send visibility events for TopTabs screens
  Update screen-api.md
  Push screen from drawer in example app
  Update top-level-api.md (Added forgotten styles) (wix#1600)
  Update readme for title Image on top bar (wix#1599)
  Update screen-api.md
  fix iOS crash on showController (wix#1588)
  Add show modal button to SideMenu
  Fix crash when SideMenu closes
  Add onKeyUp event to ActivityCallbacks
  Update screen-api.md
  Update top-level-api.md
  ...

# Conflicts:
#	android/app/src/main/java/com/reactnativenavigation/animation/VisibilityAnimator.java
#	ios/Helpers/RCTHelpers.h
#	ios/Helpers/RCTHelpers.m
#	ios/RCCViewController.m
timxyz pushed a commit to 3sidedcube/react-native-navigation that referenced this pull request Aug 3, 2017
* develop: (96 commits)
  Update styling-the-navigator.md
  Support statusBarTextColorScheme on Android
  Remove depreciated createJSModules @OverRide marker (wix#1628)
  Fix crash with scrollViewDidEndDecelerating and RCTTextView (wix#1630)
  Center title when setting title dynamically
  update docs for iOS drawer animations in top-level-api section (wix#1619)
  walk-around for React-Native bug with multiple RCTRootView (wix#1618)
  Send initial screen appear event after it's displayed
  Send visibility events for TopTabs screens
  Update screen-api.md
  Push screen from drawer in example app
  Update top-level-api.md (Added forgotten styles) (wix#1600)
  Update readme for title Image on top bar (wix#1599)
  Update screen-api.md
  fix iOS crash on showController (wix#1588)
  Add show modal button to SideMenu
  Fix crash when SideMenu closes
  Add onKeyUp event to ActivityCallbacks
  Update screen-api.md
  Update top-level-api.md
  ...
junedomingo pushed a commit to junedomingo/react-native-navigation that referenced this pull request Sep 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant