Closed luutruong closed 3 years ago
I have forked the repo to fix this issue.
npm i @codler/react-native-keyboard-aware-scroll-view
Brilliant, thanks @codler
try this one: "react-native-keyboard-aware-scroll-view": "github:APSL/react-native-keyboard-aware-scroll-view#pull/501/head",
the issue persist in RN66.3
the issue persist in RN66.3
On RN 66.3 I added the following dependency in the package.json
of my project and it worked:
"resolutions": {
"native-base/@codler/react-native-keyboard-aware-scroll-view": "2.0.0"
},
Note: I am using native-base
.
Issue is persistent in RN68
Issue resolved with latest version react-native-keyboard-aware-scroll-view: 0.9.5
Facing issue with RN 68 and native base.
Im on 0.9.5 and still experiencing this issue occasionally, specifically after a sandbox purchase is made.
It is happening on RN 71 as well, using native-base
overrides
worked for me on RN 71, put it in package.json
I was using native-base
, maybe it won't work for one's who is using keyboard aware package directly
"overrides": {
"native-base": {
"@codler/react-native-keyboard-aware-scroll-view": "2.0.1"
}
}
removed node_modules
and re-installed packages using npm install
, and crash went away
None of these worked for me. I am using RN 0.68.7 and "react-native-keyboard-aware-scroll-view": "^0.9.5". Can someone help / was anyone able to fix it? @miteshdb @luutruong @codler @dongdyang
None of these worked for me. I am using RN 0.68.7 and "react-native-keyboard-aware-scroll-view": "^0.9.5". Can someone help / was anyone able to fix it? @miteshdb @luutruong @codler @dongdyang
Did you try to clear cache?
Update the following code in the /node_modules/@codler/react-native-keyboard-aware-scroll-view/lib/KeyboardAwareHOC.js file line number 244.
`scrollToPosition = (x: number, y: number, animated: boolean = true) => { const responder = this.getScrollResponder() if (!responder) { return } if (responder.scrollResponderScrollTo) { // React Native < 0.65 responder.scrollResponderScrollTo({ x, y, animated }) } else if (responder.scrollTo) { // React Native >= 0.65 responder.scrollTo({ x, y, animated }) } // responder && responder.scrollResponderScrollTo({ x, y, animated }) }
scrollToEnd = (animated?: boolean = true) => { const responder = this.getScrollResponder() if (!responder) { return } if (responder.scrollResponderScrollTo) { // React Native < 0.65 responder.scrollResponderScrollTo({ x, y, animated }) } else if (responder.scrollTo) { // React Native >= 0.65 responder.scrollTo({ x, y, animated }) } // responder && responder.scrollResponderScrollToEnd({ animated }) }`
Above Worked for me! I was use older version of native-base "^2.15.2" with latest react native version "0.72.6". I don't where that codler came from but this solved my issue.
scrollToPosition = (x: number, y: number, animated: boolean = true) => {
const responder = this.getScrollResponder()
if (!responder) {
return
}
if (responder.scrollResponderScrollTo) {
// React Native < 0.65
responder.scrollResponderScrollTo({ x, y, animated })
} else if (responder.scrollTo) {
// React Native >= 0.65
responder.scrollTo({ x, y, animated })
}
// responder && responder.scrollResponderScrollTo({ x, y, animated })
}
scrollToEnd = (animated?: boolean = true) => {
const responder = this.getScrollResponder()
if (!responder) {
return
}
if (responder.scrollResponderScrollTo) {
// React Native < 0.65
responder.scrollResponderScrollTo({ x, y, animated })
} else if (responder.scrollTo) {
// React Native >= 0.65
responder.scrollTo({ x, y, animated })
}
// responder && responder.scrollResponderScrollToEnd({ animated })
}
@alishah514 solution worked. I arranged the text for proper visualization. I am using native-base: 2.13.15, react-native: 0.72.6
@Seunope @alishah514 This issue occurs only if we are using native base?
@Yandamuri Yes, if you look into native base's inner node modules you'll find dependency of codler/react-native-keyboard-aware-scroll-view there. That is the main reason of this issue. Plus Older Version of native base and newer react native version makes this issue.
scrollToPosition = (x: number, y: number, animated: boolean = true) => { const responder = this.getScrollResponder() if (!responder) { return } if (responder.scrollResponderScrollTo) { // React Native < 0.65 responder.scrollResponderScrollTo({ x, y, animated }) } else if (responder.scrollTo) { // React Native >= 0.65 responder.scrollTo({ x, y, animated }) } // responder && responder.scrollResponderScrollTo({ x, y, animated }) } scrollToEnd = (animated?: boolean = true) => { const responder = this.getScrollResponder() if (!responder) { return } if (responder.scrollResponderScrollTo) { // React Native < 0.65 responder.scrollResponderScrollTo({ x, y, animated }) } else if (responder.scrollTo) { // React Native >= 0.65 responder.scrollTo({ x, y, animated }) } // responder && responder.scrollResponderScrollToEnd({ animated }) }
@alishah514 solution worked. I arranged the text for proper visualization. I am using native-base: 2.13.15, react-native: 0.72.6
Are you tried to apply an patch?
Today i have upgraded to RN 0.65.1 and got this error.
Lib version:
"react-native-keyboard-aware-scroll-view": "^0.9.4",
The error pointed to this line: https://github.com/APSL/react-native-keyboard-aware-scroll-view/blob/master/lib/KeyboardAwareHOC.js#L276