react-native-keyboard-aware-scroll-view: library will crash on react native 0.65.0
since this 099f67cf8a has been added to react native 0.65.0, the library will crash when trying to call scrollResponderScrollTo
or scrollResponderScrollToEnd
, I’ve solved it by changing these functions to scrollTo
and scrollToEnd
, please solve this ASAP because many users will be affected by that change in the upcoming version of react native.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 13
- Comments: 22 (1 by maintainers)
Commits related to this issue
- Fix #8, #12, APSL/react-native-keyboard-aware-scroll-view#484 APSL/react-native-keyboard-aware-scroll-view#494 — committed to codler/react-native-keyboard-aware-scroll-view by codler 3 years ago
- Fix scroll responder crash on RN 0.65.1 https://github.com/APSL/react-native-keyboard-aware-scroll-view/issues/494 — committed to punchh/react-native-keyboard-aware-scroll-view by dishantwalia 3 years ago
If anyone need it while waiting for an official release, here is the patch from husseinAbdulnabi@e66c4a6 that can be used with
patch-package
(https://www.npmjs.com/package/patch-package).filename
react-native-keyboard-aware-scroll-view+0.9.4.patch
This fix seem to work on my app.
when will the fix be released?
try this one
"react-native-keyboard-aware-scroll-view": "github:APSL/react-native-keyboard-aware-scroll-view#pull/501/head",
+1 Working fine
https://github.com/APSL/react-native-keyboard-aware-scroll-view/pull/501
I have forked the repo to fix this issue.
I can confirm that this library breaks with this setup:
Screenshot of error:
Unfortunately I can’t rectify it because I’m not calling any the functions mentioned in the previous post.
Just by using it like that will trow an error:
The only way to overcome this problem is to add an additional check on the function
scrollResponderScrollTo
like thatnode_modules/react-native-keyboard-aware-scroll-view/lib/KeyboardAwareHOC.js (line 276)
Here the beautified output of the
responder
object@lfoliveir4
change this in your package.json “react-native-keyboard-aware-scroll-view”: “github:APSL/react-native-keyboard-aware-scroll-view#pull/501/head”,
npm install in project directory and run project
@srmagura nativebase v2 only; v3 dropped that dependecy
@h0nor check this https://github.com/husseinAbdulnabi/react-native-keyboard-aware-scroll-view/commit/e66c4a62fde8295ab511d086d0d59ef3247a5225
@h0nor Yes it will.
I have temporarily copied all the files into my project folder, with this change and including the
index.js
from where I now import the lib, and it works.Keeping in mind I don’t invoke any of the
scrollTo*
functions as I don’t need them.Would love to contribute but I’m super busy with other projects unfortunately.