Skip to content

Commit 5308bc0

Browse files
authored
Merge pull request #117 from Gamal-Shaban/fix-hide-keyboard-android
fix crash in android when hide keyboard
2 parents 3cb9724 + e43398e commit 5308bc0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/useKeyboard.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ export function useKeyboard() {
2525
}
2626
const handleKeyboardDidHide: KeyboardEventListener = (e) => {
2727
setShown(false)
28-
setCoordinates({start: e.startCoordinates, end: e.endCoordinates})
28+
if (e) {
29+
setCoordinates({start: e.startCoordinates, end: e.endCoordinates})
30+
}
2931
setKeyboardHeight(0)
3032
}
3133

0 commit comments

Comments
 (0)