Skip to content

Commit

Permalink
Merge pull request #117 from Gamal-Shaban/fix-hide-keyboard-android
Browse files Browse the repository at this point in the history
fix crash in android when hide keyboard
  • Loading branch information
pvinis committed Mar 30, 2020
2 parents 3cb9724 + e43398e commit 5308bc0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/useKeyboard.ts
Expand Up @@ -25,7 +25,9 @@ export function useKeyboard() {
}
const handleKeyboardDidHide: KeyboardEventListener = (e) => {
setShown(false)
setCoordinates({start: e.startCoordinates, end: e.endCoordinates})
if (e) {
setCoordinates({start: e.startCoordinates, end: e.endCoordinates})
}
setKeyboardHeight(0)
}

Expand Down

0 comments on commit 5308bc0

Please sign in to comment.