fix: google password manager breaks KeyboardAwareScrollView
#667
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📜 Description
Fixed input hiding when google password manager pops up.
💡 Motivation and Context
The native code worked correctly, however when Google Password manager popup appears, then we have next events:
So because of this fact we kept bottom area (fake view). When keyboard appear again, then we were animating this bottom view again from 0 to 290. But since in the beginning of the keyboard movement focused input was above the keyboard - we don't perform
scrollTo
operation. But when bottom padding collapses to0
an then input moves behind the keyboard. And since we don't callscrollTo
it keeps its present there.To fix the problem and don't break the state machine we need to synchronize keyboardFrame (currentKeybaordFrame) in
onEnd
handler. Thus when popup appears, the input will be moved to bottom. When keyboard appear it'll correctly understand, that the keyboard will overlap the input and thus it will push the input as expected.Fixes #665
📢 Changelog
JS
currentKeyboardFrame
inonEnd
handler;syncKeyboardFrame
function.🤔 How Has This Been Tested?
Tested manually on Pixel 7 Pro API 35.
📸 Screenshots (if appropriate):
telegram-cloud-document-2-5263016610569936569.mp4
telegram-cloud-document-2-5263016610569936563.mp4
📝 Checklist