From 545bd7bff44f7502369e99f9016983fdf135fb98 Mon Sep 17 00:00:00 2001 From: Dobo Radichkov Date: Sun, 17 May 2026 18:30:13 +0100 Subject: [PATCH] docs: add overrideScrollViewContentInsetAdjustmentBehavior option to bottom tab navigator MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes react-navigation/react-navigation.github.io#1491 The option has been exposed on Tab.Screen since react-native-screens v3 (via @react-navigation/bottom-tabs/unstable types), but isn't listed on the docs page. It's the only escape hatch for a fairly common visible bug — a blank gap appearing above content in a nested native-stack screen that uses headerTransparent: true on iOS — and readers hitting the symptom have no way to discover it from the documentation. Added to v7 (native-bottom-tab-navigator.md) and v8 (bottom-tab-navigator.md). Co-Authored-By: Claude Opus 4.7 (1M context) --- .../native-bottom-tab-navigator.md | 20 +++++++++++++++++++ .../version-8.x/bottom-tab-navigator.md | 20 +++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/versioned_docs/version-7.x/native-bottom-tab-navigator.md b/versioned_docs/version-7.x/native-bottom-tab-navigator.md index 979d0a3e77..f4d2e677ec 100755 --- a/versioned_docs/version-7.x/native-bottom-tab-navigator.md +++ b/versioned_docs/version-7.x/native-bottom-tab-navigator.md @@ -503,6 +503,26 @@ When `false`, tapping on the tab in tab bar won't select the tab. Custom behavio Defaults to `true`. +#### `overrideScrollViewContentInsetAdjustmentBehavior` + +Whether to override the `contentInsetAdjustmentBehavior` of the first `ScrollView` in the first descendant chain from the tab screen. + +By default, React Native's `ScrollView` has `contentInsetAdjustmentBehavior` set to `never` instead of the UIKit default (`automatic`), which prevents `ScrollView`s from respecting navigation bar insets. When this option is `true`, that override is applied, restoring UIKit's `automatic` behavior for the first descendant `ScrollView`. + +Defaults to `true`. To disable for specific screens — for example to fix a blank gap appearing above content in a nested native-stack screen that uses `headerTransparent: true` — set the option to `false`: + +```js + +``` + +Only supported on iOS. + #### `bottomAccessory` Function that returns a React element to display as an accessory view. The function receives an options object with a `placement` parameter that can be one of the following values: diff --git a/versioned_docs/version-8.x/bottom-tab-navigator.md b/versioned_docs/version-8.x/bottom-tab-navigator.md index 10b3894d53..3a368f2fea 100755 --- a/versioned_docs/version-8.x/bottom-tab-navigator.md +++ b/versioned_docs/version-8.x/bottom-tab-navigator.md @@ -1043,6 +1043,26 @@ When `false`, tapping on the tab in tab bar won't select the tab. Custom behavio Defaults to `true`. +#### `overrideScrollViewContentInsetAdjustmentBehavior` + +Whether to override the `contentInsetAdjustmentBehavior` of the first `ScrollView` in the first descendant chain from the tab screen. + +By default, React Native's `ScrollView` has `contentInsetAdjustmentBehavior` set to `never` instead of the UIKit default (`automatic`), which prevents `ScrollView`s from respecting navigation bar insets. When this option is `true`, that override is applied, restoring UIKit's `automatic` behavior for the first descendant `ScrollView`. + +Defaults to `true`. To disable for specific screens — for example to fix a blank gap appearing above content in a nested native-stack screen that uses `headerTransparent: true` — set the option to `false`: + +```js + +``` + +Only supported on iOS. + #### `bottomAccessory` Function that returns a React element to display as an accessory view. The function receives an options object with a `placement` parameter that can be one of the following values: