Open History to see the last commit
1diff --git a/lib/commonjs/components/KeyboardChatScrollView/index.js b/lib/commonjs/components/KeyboardChatScrollView/index.js
2index db8cfb1d289f91563f13c4dd842c783c99facc32..940e1dd80c6c9dfc42eab916445be414372ce52e 100644
3--- a/lib/commonjs/components/KeyboardChatScrollView/index.js
4+++ b/lib/commonjs/components/KeyboardChatScrollView/index.js
5@@ -26,9 +26,11 @@ const KeyboardChatScrollView = /*#__PURE__*/(0, _react.forwardRef)(({
6 offset = 0,
7 extraContentPadding = ZERO_CONTENT_PADDING,
8 blankSpace = ZERO_BLANK_SPACE,
9+ adjustedInsetCompensation = 0,
10 applyWorkaroundForContentInsetHitTestBug = false,
11 onLayout: onLayoutProp,
12 onContentSizeChange: onContentSizeChangeProp,
13+ onContentInsetChange,
14 onEndVisible,
15 ...rest
16 }, ref) => {
17@@ -50,13 +52,15 @@ const KeyboardChatScrollView = /*#__PURE__*/(0, _react.forwardRef)(({
18 freeze: freezeSV,
19 offset,
20 blankSpace,
21- extraContentPadding
22+ extraContentPadding,
23+ adjustedInsetCompensation
24 });
25 (0, _useExtraContentPadding.useExtraContentPadding)({
26 scrollViewRef,
27 extraContentPadding,
28 keyboardPadding: padding,
29 blankSpace,
30+ adjustedInsetCompensation,
31 scroll,
32 layout,
33 size,
34@@ -82,10 +86,21 @@ const KeyboardChatScrollView = /*#__PURE__*/(0, _react.forwardRef)(({
35 // a bug for you, please open an issue.
36 const totalPadding = (0, _reactNativeReanimated.useDerivedValue)(() => Math.min(layout.value.height, Math.max(blankSpace.value, padding.value + extraContentPadding.value)));
38+ // Mirror the effective bottom padding (keyboard + composer + blank floor)
39+ // to the consumer - a virtualized list needs it in its own scroll math or
40+ // its end/maintain targets point at the under-the-keyboard resting offset.
41+ (0, _reactNativeReanimated.useAnimatedReaction)(() => totalPadding.value, (current, previous) => {
42+ if (onContentInsetChange && current !== previous) {
43+ (0, _reactNativeReanimated.runOnJS)(onContentInsetChange)({
44+ bottom: current
45+ });
46+ }
47+ }, [onContentInsetChange]);
48+
49 // Scroll indicator inset = keyboard + extraContentPadding (excludes blankSpace).
50 // Apps that render into the unsafe area can supply a negative
51 // scrollIndicatorInsets adjustment at the application layer.
52- const indicatorPadding = (0, _reactNativeReanimated.useDerivedValue)(() => padding.value + extraContentPadding.value);
53+ const indicatorPadding = (0, _reactNativeReanimated.useDerivedValue)(() => padding.value);
54 const onLayout = (0, _react.useCallback)(e => {
55 onLayoutInternal(e);
56 onLayoutProp === null || onLayoutProp === void 0 || onLayoutProp(e);
57diff --git a/lib/commonjs/components/KeyboardChatScrollView/useChatKeyboard/index.ios.js b/lib/commonjs/components/KeyboardChatScrollView/useChatKeyboard/index.ios.js
58index 2073da84b8b2be291aa3181700c2b18a75d0fc56..f43f2efdc4f0eda0460720839544dc6e7f4a54e0 100644
59--- a/lib/commonjs/components/KeyboardChatScrollView/useChatKeyboard/index.ios.js
60+++ b/lib/commonjs/components/KeyboardChatScrollView/useChatKeyboard/index.ios.js
61@@ -32,7 +32,8 @@ function useChatKeyboard(scrollViewRef, options) {
62 freeze,
63 offset,
64 blankSpace,
65- extraContentPadding
66+ extraContentPadding,
67+ adjustedInsetCompensation
68 } = options;
69 const padding = (0, _reactNativeReanimated.useSharedValue)(0);
70 const currentHeight = (0, _reactNativeReanimated.useSharedValue)(0);
71@@ -66,7 +67,7 @@ function useChatKeyboard(scrollViewRef, options) {
72 const visiblePadding = visibleFraction * blankSpace.value;
73 const minimumPaddingAbsorbed = Math.max(0, visiblePadding - extraContentPadding.value);
74 const scrollEffective = (0, _helpers.getScrollEffective)(effective, minimumPaddingAbsorbed);
75- const actualTotalPadding = Math.max(blankSpace.value, effective + extraContentPadding.value);
76+ const actualTotalPadding = Math.max(blankSpace.value, effective + extraContentPadding.value) + adjustedInsetCompensation;
78 // persistent mode: when keyboard shrinks, clamp to valid range
79 if (keyboardLiftBehavior === "persistent" && effective < padding.value) {
80@@ -134,7 +135,7 @@ function useChatKeyboard(scrollViewRef, options) {
81 const effective = (0, _helpers.getEffectiveHeight)(e.height, targetKeyboardHeight.value, offset);
82 padding.value = effective;
83 }
84- }, [inverted, keyboardLiftBehavior, offset, extraContentPadding]);
85+ }, [inverted, keyboardLiftBehavior, offset, extraContentPadding, adjustedInsetCompensation]);
86 return {
87 padding,
88 currentHeight,
89diff --git a/lib/commonjs/components/KeyboardChatScrollView/useExtraContentPadding/index.js b/lib/commonjs/components/KeyboardChatScrollView/useExtraContentPadding/index.js
90index 0d50bdfeb7bbc5c14a31ed344f8a690e4fd340b3..22ca193257ab0068f732c088b09145dabf39a05e 100644
91--- a/lib/commonjs/components/KeyboardChatScrollView/useExtraContentPadding/index.js
92+++ b/lib/commonjs/components/KeyboardChatScrollView/useExtraContentPadding/index.js
93@@ -29,6 +29,7 @@ function useExtraContentPadding(options) {
94 extraContentPadding,
95 keyboardPadding,
96 blankSpace,
97+ adjustedInsetCompensation,
98 scroll,
99 layout,
100 size,
101@@ -68,8 +69,8 @@ function useExtraContentPadding(options) {
102 }
104 // Compute effective delta considering blankSpace floor
105- const previousTotal = Math.max(blankSpace.value, keyboardPadding.value + previous);
106- const currentTotal = Math.max(blankSpace.value, keyboardPadding.value + current);
107+ const previousTotal = Math.max(blankSpace.value, keyboardPadding.value + previous) + adjustedInsetCompensation;
108+ const currentTotal = Math.max(blankSpace.value, keyboardPadding.value + current) + adjustedInsetCompensation;
109 const effectiveDelta = currentTotal - previousTotal;
110 if (effectiveDelta === 0) {
111 // blankSpace absorbed the change
112@@ -92,6 +93,6 @@ function useExtraContentPadding(options) {
113 const target = Math.min(scroll.value + effectiveDelta, maxScroll);
114 scrollToTarget(target);
115 }
116- }, [inverted, keyboardLiftBehavior]);
117+ }, [inverted, keyboardLiftBehavior, adjustedInsetCompensation]);
118 }
119 //# sourceMappingURL=index.js.map
120\ No newline at end of file
121diff --git a/lib/module/components/KeyboardChatScrollView/index.js b/lib/module/components/KeyboardChatScrollView/index.js
122index 612dd8bd9bd6cc3e30a5acac937ea3383eb1b630..ac79433fdf0b36f89525b9840447a116da63d58c 100644
123--- a/lib/module/components/KeyboardChatScrollView/index.js
124+++ b/lib/module/components/KeyboardChatScrollView/index.js
125@@ -1,7 +1,7 @@
126 function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
127 import React, { forwardRef, useCallback, useMemo } from "react";
128 import { StyleSheet } from "react-native";
129-import { makeMutable, useAnimatedRef, useAnimatedStyle, useDerivedValue } from "react-native-reanimated";
130+import { makeMutable, runOnJS, useAnimatedReaction, useAnimatedRef, useAnimatedStyle, useDerivedValue } from "react-native-reanimated";
131 import Reanimated from "react-native-reanimated";
132 import useCombinedRef from "../hooks/useCombinedRef";
133 import ScrollViewWithBottomPadding from "../ScrollViewWithBottomPadding";
134@@ -19,9 +19,11 @@ const KeyboardChatScrollView = /*#__PURE__*/forwardRef(({
135 offset = 0,
136 extraContentPadding = ZERO_CONTENT_PADDING,
137 blankSpace = ZERO_BLANK_SPACE,
138+ adjustedInsetCompensation = 0,
139 applyWorkaroundForContentInsetHitTestBug = false,
140 onLayout: onLayoutProp,
141 onContentSizeChange: onContentSizeChangeProp,
142+ onContentInsetChange,
143 onEndVisible,
144 ...rest
145 }, ref) => {
146@@ -43,13 +45,15 @@ const KeyboardChatScrollView = /*#__PURE__*/forwardRef(({
147 freeze: freezeSV,
148 offset,
149 blankSpace,
150- extraContentPadding
151+ extraContentPadding,
152+ adjustedInsetCompensation
153 });
154 useExtraContentPadding({
155 scrollViewRef,
156 extraContentPadding,
157 keyboardPadding: padding,
158 blankSpace,
159+ adjustedInsetCompensation,
160 scroll,
161 layout,
162 size,
163@@ -75,10 +79,21 @@ const KeyboardChatScrollView = /*#__PURE__*/forwardRef(({
164 // a bug for you, please open an issue.
165 const totalPadding = useDerivedValue(() => Math.min(layout.value.height, Math.max(blankSpace.value, padding.value + extraContentPadding.value)));
167+ // Mirror the effective bottom padding (keyboard + composer + blank floor)
168+ // to the consumer - a virtualized list needs it in its own scroll math or
169+ // its end/maintain targets point at the under-the-keyboard resting offset.
170+ useAnimatedReaction(() => totalPadding.value, (current, previous) => {
171+ if (onContentInsetChange && current !== previous) {
172+ runOnJS(onContentInsetChange)({
173+ bottom: current
174+ });
175+ }
176+ }, [onContentInsetChange]);
177+
178 // Scroll indicator inset = keyboard + extraContentPadding (excludes blankSpace).
179 // Apps that render into the unsafe area can supply a negative
180 // scrollIndicatorInsets adjustment at the application layer.
181- const indicatorPadding = useDerivedValue(() => padding.value + extraContentPadding.value);
182+ const indicatorPadding = useDerivedValue(() => padding.value);
183 const onLayout = useCallback(e => {
184 onLayoutInternal(e);
185 onLayoutProp === null || onLayoutProp === void 0 || onLayoutProp(e);
186diff --git a/lib/module/components/KeyboardChatScrollView/useChatKeyboard/index.ios.js b/lib/module/components/KeyboardChatScrollView/useChatKeyboard/index.ios.js
187index 52943c3a7d6a68fe2094dc1d112c07e6b9d890e4..c8685c18a53ad078c24fc3e3b6572669b2b63397 100644
188--- a/lib/module/components/KeyboardChatScrollView/useChatKeyboard/index.ios.js
189+++ b/lib/module/components/KeyboardChatScrollView/useChatKeyboard/index.ios.js
190@@ -25,7 +25,8 @@ function useChatKeyboard(scrollViewRef, options) {
191 freeze,
192 offset,
193 blankSpace,
194- extraContentPadding
195+ extraContentPadding,
196+ adjustedInsetCompensation
197 } = options;
198 const padding = useSharedValue(0);
199 const currentHeight = useSharedValue(0);
200@@ -59,7 +60,7 @@ function useChatKeyboard(scrollViewRef, options) {
201 const visiblePadding = visibleFraction * blankSpace.value;
202 const minimumPaddingAbsorbed = Math.max(0, visiblePadding - extraContentPadding.value);
203 const scrollEffective = getScrollEffective(effective, minimumPaddingAbsorbed);
204- const actualTotalPadding = Math.max(blankSpace.value, effective + extraContentPadding.value);
205+ const actualTotalPadding = Math.max(blankSpace.value, effective + extraContentPadding.value) + adjustedInsetCompensation;
207 // persistent mode: when keyboard shrinks, clamp to valid range
208 if (keyboardLiftBehavior === "persistent" && effective < padding.value) {
209@@ -127,7 +128,7 @@ function useChatKeyboard(scrollViewRef, options) {
210 const effective = getEffectiveHeight(e.height, targetKeyboardHeight.value, offset);
211 padding.value = effective;
212 }
213- }, [inverted, keyboardLiftBehavior, offset, extraContentPadding]);
214+ }, [inverted, keyboardLiftBehavior, offset, extraContentPadding, adjustedInsetCompensation]);
215 return {
216 padding,
217 currentHeight,
218diff --git a/lib/module/components/KeyboardChatScrollView/useExtraContentPadding/index.js b/lib/module/components/KeyboardChatScrollView/useExtraContentPadding/index.js
219index 1afa50987a8d2a5fe3f36b20945efe804d48a873..e2966d89d4329a7dc1233ff060cab6f365f745d6 100644
220--- a/lib/module/components/KeyboardChatScrollView/useExtraContentPadding/index.js
221+++ b/lib/module/components/KeyboardChatScrollView/useExtraContentPadding/index.js
222@@ -23,6 +23,7 @@ function useExtraContentPadding(options) {
223 extraContentPadding,
224 keyboardPadding,
225 blankSpace,
226+ adjustedInsetCompensation,
227 scroll,
228 layout,
229 size,
230@@ -62,8 +63,8 @@ function useExtraContentPadding(options) {
231 }
233 // Compute effective delta considering blankSpace floor
234- const previousTotal = Math.max(blankSpace.value, keyboardPadding.value + previous);
235- const currentTotal = Math.max(blankSpace.value, keyboardPadding.value + current);
236+ const previousTotal = Math.max(blankSpace.value, keyboardPadding.value + previous) + adjustedInsetCompensation;
237+ const currentTotal = Math.max(blankSpace.value, keyboardPadding.value + current) + adjustedInsetCompensation;
238 const effectiveDelta = currentTotal - previousTotal;
239 if (effectiveDelta === 0) {
240 // blankSpace absorbed the change
241@@ -86,7 +87,7 @@ function useExtraContentPadding(options) {
242 const target = Math.min(scroll.value + effectiveDelta, maxScroll);
243 scrollToTarget(target);
244 }
245- }, [inverted, keyboardLiftBehavior]);
246+ }, [inverted, keyboardLiftBehavior, adjustedInsetCompensation]);
247 }
248 export { useExtraContentPadding };
249 //# sourceMappingURL=index.js.map
250\ No newline at end of file
251diff --git a/lib/typescript/components/KeyboardChatScrollView/types.d.ts b/lib/typescript/components/KeyboardChatScrollView/types.d.ts
252index a036b431f03efb9d5379527c17db6fce62bfee09..6ca6fdf60fc9fae1e28a86cf24e21beed99b3a76 100644
253--- a/lib/typescript/components/KeyboardChatScrollView/types.d.ts
254+++ b/lib/typescript/components/KeyboardChatScrollView/types.d.ts
255@@ -86,6 +86,8 @@ export type KeyboardChatScrollViewProps = {
256 * Default is `undefined` (equivalent to `0` — no minimum floor).
257 */
258 blankSpace?: SharedValue<number>;
259+ /** Extra bottom inset UIKit adds beyond the raw contentInset (safe area). Offset math only. */
260+ adjustedInsetCompensation?: number;
261 /**
262 * Fires whenever the effective content inset changes — the static `contentInset`
263 * prop combined with the dynamic keyboard-driven padding.
264diff --git a/lib/typescript/components/KeyboardChatScrollView/useChatKeyboard/types.d.ts b/lib/typescript/components/KeyboardChatScrollView/useChatKeyboard/types.d.ts
265index aff9b5a8dbc2464546396437eaf6c5ae955b9f29..67edbe1a1eac27b5a571611979753ebf3134bc8b 100644
266--- a/lib/typescript/components/KeyboardChatScrollView/useChatKeyboard/types.d.ts
267+++ b/lib/typescript/components/KeyboardChatScrollView/useChatKeyboard/types.d.ts
268@@ -9,6 +9,8 @@ type UseChatKeyboardOptions = {
269 blankSpace: SharedValue<number>;
270 /** Extra content padding shared value — needed on iOS to correctly clamp contentOffset. */
271 extraContentPadding: SharedValue<number>;
272+ /** Safe-area extra beyond raw contentInset. Offset math only. */
273+ adjustedInsetCompensation: number;
274 };
275 type UseChatKeyboardReturn = {
276 /** Extra scrollable space (= keyboard height). Used as contentInset on iOS, contentInsetBottom/contentInsetTop on Android. */
277diff --git a/lib/typescript/components/KeyboardChatScrollView/useExtraContentPadding/index.d.ts b/lib/typescript/components/KeyboardChatScrollView/useExtraContentPadding/index.d.ts
278index ec73f70544a062fbecfc1d8be92d839d3e0bea6f..6fe16cd0b1200a2f4d4d8eeb9b555747186dbfe0 100644
279--- a/lib/typescript/components/KeyboardChatScrollView/useExtraContentPadding/index.d.ts
280+++ b/lib/typescript/components/KeyboardChatScrollView/useExtraContentPadding/index.d.ts
281@@ -8,6 +8,8 @@ type UseExtraContentPaddingOptions = {
282 keyboardPadding: SharedValue<number>;
283 /** Minimum inset floor — used to absorb keyboard and extraContentPadding changes. */
284 blankSpace: SharedValue<number>;
285+ /** Safe-area extra beyond raw contentInset. Offset math only. */
286+ adjustedInsetCompensation: number;
287 /** Current vertical scroll offset. */
288 scroll: SharedValue<number>;
289 /** Visible viewport dimensions. */
290diff --git a/src/components/KeyboardChatScrollView/index.tsx b/src/components/KeyboardChatScrollView/index.tsx
291index 03f5f74e9aaaabc75db1c01643a655ee4fdfa5f2..d657002ebbce53c47e3a713c0921c35dca6056f3 100644
292--- a/src/components/KeyboardChatScrollView/index.tsx
293+++ b/src/components/KeyboardChatScrollView/index.tsx
294@@ -2,6 +2,8 @@ import React, { forwardRef, useCallback, useMemo } from "react";
295 import { StyleSheet } from "react-native";
296 import {
297 makeMutable,
298+ runOnJS,
299+ useAnimatedReaction,
300 useAnimatedRef,
301 useAnimatedStyle,
302 useDerivedValue,
303@@ -35,9 +37,11 @@ const KeyboardChatScrollView = forwardRef<
304 offset = 0,
305 extraContentPadding = ZERO_CONTENT_PADDING,
306 blankSpace = ZERO_BLANK_SPACE,
307+ adjustedInsetCompensation = 0,
308 applyWorkaroundForContentInsetHitTestBug = false,
309 onLayout: onLayoutProp,
310 onContentSizeChange: onContentSizeChangeProp,
311+ onContentInsetChange,
312 onEndVisible,
313 ...rest
314 },
315@@ -64,6 +68,7 @@ const KeyboardChatScrollView = forwardRef<
316 offset,
317 blankSpace,
318 extraContentPadding,
319+ adjustedInsetCompensation,
320 });
322 useExtraContentPadding({
323@@ -71,6 +76,7 @@ const KeyboardChatScrollView = forwardRef<
324 extraContentPadding,
325 keyboardPadding: padding,
326 blankSpace,
327+ adjustedInsetCompensation,
328 scroll,
329 layout,
330 size,
331@@ -102,13 +108,25 @@ const KeyboardChatScrollView = forwardRef<
332 ),
333 );
335- // Scroll indicator inset = keyboard + extraContentPadding (excludes blankSpace).
336- // Apps that render into the unsafe area can supply a negative
337- // scrollIndicatorInsets adjustment at the application layer.
338- const indicatorPadding = useDerivedValue(
339- () => padding.value + extraContentPadding.value,
340+ // Mirror the effective bottom padding (keyboard + composer + blank floor)
341+ // to the consumer — a virtualized list needs it in its own scroll math or
342+ // its end/maintain targets point at the under-the-keyboard resting offset.
343+ useAnimatedReaction(
344+ () => totalPadding.value,
345+ (current, previous) => {
346+ if (onContentInsetChange && current !== previous) {
347+ runOnJS(onContentInsetChange)({ bottom: current });
348+ }
349+ },
350+ [onContentInsetChange],
351 );
353+ // Scroll indicator inset = keyboard only (excludes extraContentPadding and
354+ // blankSpace): with a floating composer the indicator track should run the
355+ // full height of the scroll view, behind the composer, like iOS Messages.
356+ // The keyboard still lifts it so it never disappears under the keyboard.
357+ const indicatorPadding = useDerivedValue(() => padding.value);
358+
359 const onLayout = useCallback(
360 (e: LayoutChangeEvent) => {
361 onLayoutInternal(e);
362diff --git a/src/components/KeyboardChatScrollView/types.ts b/src/components/KeyboardChatScrollView/types.ts
363index dd222b57bc7a71729524670bad3812f30920bd73..40249a4357991b7a9c69b87214db2ceb6ff4ba7d 100644
364--- a/src/components/KeyboardChatScrollView/types.ts
365+++ b/src/components/KeyboardChatScrollView/types.ts
366@@ -90,6 +90,15 @@ export type KeyboardChatScrollViewProps = {
367 * Default is `undefined` (equivalent to `0` — no minimum floor).
368 */
369 blankSpace?: SharedValue<number>;
370+ /**
371+ * Extra bottom inset UIKit adds on top of the raw `contentInset` this
372+ * component writes (e.g. the home-indicator safe area under
373+ * `contentInsetAdjustmentBehavior="automatic"`). Used ONLY in scroll-offset
374+ * math (max scroll / end pinning) — never written into `contentInset`.
375+ *
376+ * Default is `0`.
377+ */
378+ adjustedInsetCompensation?: number;
379 /**
380 * Fires whenever the effective content inset changes — the static `contentInset`
381 * prop combined with the dynamic keyboard-driven padding.
382diff --git a/src/components/KeyboardChatScrollView/useChatKeyboard/index.ios.ts b/src/components/KeyboardChatScrollView/useChatKeyboard/index.ios.ts
383index 560df54bae1a8c41a2e9ac0e2a8d2fd9b843968a..a0cb412692cf47fee372a01132e6a670b59bcd66 100644
384--- a/src/components/KeyboardChatScrollView/useChatKeyboard/index.ios.ts
385+++ b/src/components/KeyboardChatScrollView/useChatKeyboard/index.ios.ts
386@@ -43,6 +43,7 @@ function useChatKeyboard(
387 offset,
388 blankSpace,
389 extraContentPadding,
390+ adjustedInsetCompensation,
391 } = options;
393 const padding = useSharedValue(0);
394@@ -104,10 +105,12 @@ function useChatKeyboard(
395 effective,
396 minimumPaddingAbsorbed,
397 );
398- const actualTotalPadding = Math.max(
399- blankSpace.value,
400- effective + extraContentPadding.value,
401- );
402+ // UIKit adds adjustedInsetCompensation (safe area) on top of the raw
403+ // inset; include it here so end/max-scroll targets match the real
404+ // resting offsets.
405+ const actualTotalPadding =
406+ Math.max(blankSpace.value, effective + extraContentPadding.value) +
407+ adjustedInsetCompensation;
409 // persistent mode: when keyboard shrinks, clamp to valid range
410 if (
411@@ -242,7 +245,7 @@ function useChatKeyboard(
412 padding.value = effective;
413 },
414 },
415- [inverted, keyboardLiftBehavior, offset, extraContentPadding],
416+ [inverted, keyboardLiftBehavior, offset, extraContentPadding, adjustedInsetCompensation],
417 );
419 return {
420diff --git a/src/components/KeyboardChatScrollView/useChatKeyboard/types.ts b/src/components/KeyboardChatScrollView/useChatKeyboard/types.ts
421index 02abf5cd9490900826678175462b234e07e30e92..3f261fa8f1913a79fa1de2004bbac20415a89acc 100644
422--- a/src/components/KeyboardChatScrollView/useChatKeyboard/types.ts
423+++ b/src/components/KeyboardChatScrollView/useChatKeyboard/types.ts
424@@ -11,6 +11,8 @@ type UseChatKeyboardOptions = {
425 blankSpace: SharedValue<number>;
426 /** Extra content padding shared value — needed on iOS to correctly clamp contentOffset. */
427 extraContentPadding: SharedValue<number>;
428+ /** Extra bottom inset UIKit adds beyond the raw contentInset (safe area). Offset math only. */
429+ adjustedInsetCompensation: number;
430 };
432 type UseChatKeyboardReturn = {
433diff --git a/src/components/KeyboardChatScrollView/useExtraContentPadding/index.ts b/src/components/KeyboardChatScrollView/useExtraContentPadding/index.ts
434index 833acbe78f1b1245251ddd3431d6546decdd0ade..49d679446b03199217faa16a503d8d15e83a29b9 100644
435--- a/src/components/KeyboardChatScrollView/useExtraContentPadding/index.ts
436+++ b/src/components/KeyboardChatScrollView/useExtraContentPadding/index.ts
437@@ -16,6 +16,8 @@ type UseExtraContentPaddingOptions = {
438 keyboardPadding: SharedValue<number>;
439 /** Minimum inset floor — used to absorb keyboard and extraContentPadding changes. */
440 blankSpace: SharedValue<number>;
441+ /** Extra bottom inset UIKit adds beyond the raw contentInset (safe area). Offset math only. */
442+ adjustedInsetCompensation: number;
443 /** Current vertical scroll offset. */
444 scroll: SharedValue<number>;
445 /** Visible viewport dimensions. */
446@@ -49,6 +51,7 @@ function useExtraContentPadding(options: UseExtraContentPaddingOptions): void {
447 extraContentPadding,
448 keyboardPadding,
449 blankSpace,
450+ adjustedInsetCompensation,
451 scroll,
452 layout,
453 size,
454@@ -97,14 +100,12 @@ function useExtraContentPadding(options: UseExtraContentPaddingOptions): void {
455 }
457 // Compute effective delta considering blankSpace floor
458- const previousTotal = Math.max(
459- blankSpace.value,
460- keyboardPadding.value + previous,
461- );
462- const currentTotal = Math.max(
463- blankSpace.value,
464- keyboardPadding.value + current,
465- );
466+ const previousTotal =
467+ Math.max(blankSpace.value, keyboardPadding.value + previous) +
468+ adjustedInsetCompensation;
469+ const currentTotal =
470+ Math.max(blankSpace.value, keyboardPadding.value + current) +
471+ adjustedInsetCompensation;
472 const effectiveDelta = currentTotal - previousTotal;
474 if (effectiveDelta === 0) {
475@@ -146,7 +147,7 @@ function useExtraContentPadding(options: UseExtraContentPaddingOptions): void {
476 scrollToTarget(target);
477 }
478 },
479- [inverted, keyboardLiftBehavior],
480+ [inverted, keyboardLiftBehavior, adjustedInsetCompensation],
481 );
482 }