Fix calcScrollData to ensure the input is kept within view #18253
Pull request checklist
I was not able to run the npm commands.
I could not find any existing tests for calcScrollData to build off.
This change doesn't seem to warrant a documentation change.
Please check if your PR fulfills the following requirements:
Pull request type
Please check the type of change your PR introduces:
What is the current behavior?
On iOS, when moving focus from one input to another, the scroll calculations are incorrect resulting in the new input being scrolled out of view.
Issue Number: #17457
What is the new behavior?
Ensure the focused element is kept within view.
Does this introduce a breaking change?