From d71a35dccdf79e831aff2ba364a04e8c9385b0c5 Mon Sep 17 00:00:00 2001 From: kirillzyusko Date: Fri, 23 May 2025 19:10:05 +0200 Subject: [PATCH] fix: `KeyboardAvoidingView` incorrect layout --- src/components/KeyboardAvoidingView/index.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/KeyboardAvoidingView/index.tsx b/src/components/KeyboardAvoidingView/index.tsx index 926244e3c6..c29e9e7b5d 100644 --- a/src/components/KeyboardAvoidingView/index.tsx +++ b/src/components/KeyboardAvoidingView/index.tsx @@ -145,12 +145,13 @@ const KeyboardAvoidingView = forwardRef< const translateY = interpolateToRelativeKeyboardHeight(translate.value); const paddingBottom = interpolateToRelativeKeyboardHeight(padding.value); const bottomHeight = enabled ? bottom : 0; + const height = frame.value.height - bottomHeight; switch (behavior) { case "height": - if (!keyboard.isClosed.value) { + if (!keyboard.isClosed.value && height > 0) { return { - height: frame.value.height - bottomHeight, + height, flex: 0, }; }