When we mount component and height is updated later (windowDidResize is emitted after component mount), then we receive height=0 in maybeScroll. This PR fixes this.
Also I removed height from useSmoothKeyboardHandler because we don't use this value in the hook and we have maybeScroll in dependencies.
📜 Description
Added
height
to deps ofmaybeScroll
function.💡 Motivation and Context
When we mount component and height is updated later (
windowDidResize
is emitted after component mount), then we receiveheight=0
inmaybeScroll
. This PR fixes this.Also I removed
height
fromuseSmoothKeyboardHandler
because we don't use this value in the hook and we havemaybeScroll
in dependencies.Closes https://github.com/kirillzyusko/react-native-keyboard-controller/issues/499
📢 Changelog
JS
height
to deps ofmaybeScroll
function.🤔 How Has This Been Tested?
Tested manually on Pixel 3A (API 33, emulator).
📸 Screenshots (if appropriate):
📝 Checklist