callstack / callstack/react-native-bottom-tabs

[tvOS] Focus not restoring with sidebarAdaptable

オープン
#501 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug
主要言語
TypeScript
スター
1.5k
フォーク
109
平均マージ
11時間 44分
マージ済み PR(30日)
8

説明

### Before submitting a new issue

- [x] I tested using the latest version of the library, as the bug might be already fixed.
- [x] I tested using a [supported version](https://github.com/reactwg/react-native-releases/blob/main/docs/support.md) of react native.
- [x] I checked for possible duplicate issues, with possible answers.

### Bug summary

When closing sidebar on tvOS it automatically focuses on first visible object on the screen, not the previously focused one.

![sidebar-focus-bug](https://github.com/user-attachments/assets/58440ed5-e30d-436f-8ef1-304491f48ad1)

### Library version

1.1.0

### Environment info

```shell
System:
OS: macOS 26.0
CPU: (12) arm64 Apple M2 Max
Memory: 1.61 GB / 32.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 25.2.1
path: /opt/homebrew/bin/node
Yarn:
version: 1.22.22
path: /opt/homebrew/bin/yarn
npm:
version: 11.6.2
path: /opt/homebrew/bin/npm
Watchman: Not Found
Managers:
CocoaPods:
version: 1.16.2
path: /opt/homebrew/lib/ruby/gems/3.4.0/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 25.0
- iOS 26.0
- macOS 26.0
- tvOS 26.0
- visionOS 26.0
- watchOS 26.0
Android SDK: Not Found
IDEs:
Android Studio: Not Found
Xcode:
version: 26.0/17A324
path: /usr/bin/xcodebuild
Languages:
Java:
version: 25.0.1
path: /opt/homebrew/bin/javac
Ruby:
version: 3.4.5
path: /opt/homebrew/opt/ruby/bin/ruby
npmPackages:
"@react-native-community/cli":
installed: 20.0.2
wanted: 20.0.2
react:
installed: 19.2.3
wanted: 19.2.3
react-native: Not Found
react-native-macos: Not Found
react-native-tvos:
installed: 0.83.1-0
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: true
iOS:
hermesEnabled: true
newArchEnabled: true
```

### Steps to reproduce

1. Create navigator with sidebarAdaptable enabled
2. Create page with multiple Pressable in

### Reproducible sample code

```js

({ sfSymbol: 'star.fill' })
}}
component={(Test)} />

...


{Array.from({ length: 20 }).map((_, i) => (


Button {i}


))}

```

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

まず tvOS で sidebarAdaptable navigator example を再現し、サイドバーを閉じる前に ScrollView 内のコントロールにフォーカスを置くことに注力します。サイドバーを閉じる際に使用されるフォーカス処理のエントリポイントを追跡します。この issue ではファイルもテストも指定されていません。完了条件は、フォーカスが最初に表示されているオブジェクトではなく、以前フォーカスされていたオブジェクトに戻ることです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
react-native
領域
mobile-dev
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
42/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。