Commit f6516d2
1 file changed
+11
-0
lines changedLines changed: 11 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
588 | 588 |
| |
589 | 589 |
| |
590 | 590 |
| |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
591 | 595 |
| |
592 | 596 |
| |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
593 | 604 |
| |
594 | 605 |
| |
595 | 606 |
| |
|
9 commit comments
mysport12 commentedon Mar 28, 2019
Any chance this behavior can be made optional (with an opt-in/opt-out prop depending upon the default)? In our apps, we use the over scroll ability to move content out of the way of the virtual keyboard. Not sure if we are the exception here but it may impact other projects that were relying on this ability. @zhongwuzw
zhongwuzw commentedon Mar 29, 2019
I think you can use
contentInset
to adjust scroll area?mysport12 commentedon Mar 29, 2019
If you do that then the user can scroll all the way down to it. We only want to permit the over scroll programmatically when the onFocus event is fired from a TextInput on the screen.
mysport12 commentedon Mar 29, 2019
I can see a way of doing it with contentInset assuming a new state variable is created in my components and keyboard event listeners are used but I was hoping to not go down that road if possible. I can make an attempt at a new prop to opt out of this behavior and create a PR proposing the change. My native skills are shaky at best but I'll give it a go.
fenghengzhi commentedon May 7, 2019
it's better to add a new boolean param (false by default) to scrollTo method than just change it's old behavior
mysport12 commentedon May 7, 2019
A new Boolean param was added that allows for opting back in to the old behavior
jjhampton commentedon Sep 5, 2019
@mysport12 Do you know where the new Boolean param is at, and where it can be set, which allows for opting back in to the old behavior? The app I'm working on is experiencing some unintended side-effects which appear to be caused by this change.
jjhampton commentedon Sep 5, 2019
@mysport12 ^ Disregard the above question, I see it in RN 0.59.4: e3ac329 .
mysport12 commentedon Sep 5, 2019
@jjhampton To opt back in to the old behavior you can pass a prop to your ScrollView.
scrollToOverflowEnabled={true}
Or set it globally like we do in our apps. In App.js set the defaultProps outside of your component with something like this...
ScrollView.defaultProps = {
...ScrollView.defaultProps,
scrollToOverflowEnabled: true
}
Hope that helps!