Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add value to Coordinates when hide #120

Merged
Merged
7 changes: 6 additions & 1 deletion src/useKeyboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,13 @@ export default function useKeyboard() {
setShown(false)
if (e) {
setCoordinates({start: e.startCoordinates, end: e.endCoordinates})
} else {
setCoordinates({
start: {screenX: 0, screenY: 0, width: 0, height: 0},
pvinis marked this conversation as resolved.
Show resolved Hide resolved
end: {screenX: 0, screenY: 0, width: 0, height: 0},
})
setKeyboardHeight(0)
}
setKeyboardHeight(0)
}

useEffect(() => {
Expand Down