Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

[tvOS] Focus not restoring with sidebarAdaptable

Aberta
#501 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 2 dias

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
42/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Estagnada
Stack de tecnologia
react-native
Domínio
mobile-dev

Direção de pesquisa

Comece reproduzindo o sidebarAdaptable navigator example no tvOS, concentrando-se em um controle no ScrollView antes de fechar a barra lateral. Rastreie os pontos de entrada do tratamento de foco usados quando a barra lateral é fechada; o issue não especifica nenhum arquivo ou teste. Considera-se concluído quando o foco retorna ao objeto que estava focado anteriormente, em vez de ir para o primeiro objeto visível.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

bug
Before submitting a new issue
  • I tested using the latest version of the library, as the bug might be already fixed.
  • I tested using a supported version of react native.
  • 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

Library version

1.1.0

Environment info
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
<Router.Navigator
      initialRouteName="Test"
      sidebarAdaptable
      screenOptions={{
        freezeOnBlur: true,
      }}
    >
      <Tabs.Screen
          name="Watching"
          options={{
              title: 'Test',
              tabBarIcon: () => ({ sfSymbol: 'star.fill' })
          }}
          component={(Test)} />
</Router.Navigator>

...

<ScrollView>
    <View style={{ padding: 100 }}>
        {Array.from({ length: 20 }).map((_, i) => (
            <View style={{ padding: 50 }}>
                <TouchableOpacity tvParallaxProperties={{
                    magnification: 1.1,
                }}>
                    <Text>Button {i}</Text>
                </TouchableOpacity>
            </View>
        ))}
    </View>
</ScrollView>
Linguagem predominante
TypeScript
Estrelas
1.5k
Forks
108
Merge médio
22h 36min
PRs com merge (30d)
10

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de callstack/react-native-bottom-tabs

Todas as issues de callstack/react-native-bottom-tabs

Issues semelhantes

Mais issues de TypeScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.