Skip to content

Commit a76b9c2

Browse files
OnestarLeeCopilot
andauthored
Update packages/uikit-react-native/src/components/ChannelInput/index.tsx
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 6ed9bab commit a76b9c2

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

  • packages/uikit-react-native/src/components/ChannelInput

packages/uikit-react-native/src/components/ChannelInput/index.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,12 @@ const ChannelInput = (props: ChannelInputProps) => {
103103
const safeArea = useSafeAreaPadding(['top', 'left', 'right', 'bottom']);
104104

105105
// Android API 35+ keyboard avoidance handling
106+
/**
107+
* Android API 35+ introduced edge-to-edge layouts, which changed how keyboard avoidance should be handled.
108+
* For API 35+, the system manages insets automatically, so we use the provided keyboardAvoidOffset directly.
109+
* For older Android versions, we manually subtract the safe area bottom padding to avoid overlapping with system UI.
110+
* See: https://developer.android.com/develop/ui/views/layout/edge-to-edge
111+
*/
106112
const keyboardVerticalOffset = isAndroidApi35 ? keyboardAvoidOffset : -safeArea.paddingBottom + keyboardAvoidOffset;
107113
const { colors, typography } = useUIKitTheme();
108114
const { sbOptions, mentionManager } = useSendbirdChat();

0 commit comments

Comments
 (0)