Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remote controls navigation issue on webOS #1858

Open
NazarKuryl0 opened this issue Feb 15, 2025 · 2 comments
Open

Remote controls navigation issue on webOS #1858

NazarKuryl0 opened this issue Feb 15, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@NazarKuryl0
Copy link

Describe the bug
Remote controls from d-pad didn't work on webOS simulator

To Reproduce
Steps to reproduce the behavior:

  1. init app for webOS
  2. add second TouchableOpacity, simple to first one from template
  3. press down on d-pad

Expected behavior
Focus should move down

Desktop (please complete the following information):

  • OS: [osx]
  • Node Version [v23.7.0]
  • RNV Version [1.9.0]

Additional context
Replace index.tsx from src/app/index.tsx with next code

import React, { useContext } from 'react';
import { View, TouchableOpacity } from 'react-native';
import { ThemeProvider, ThemeContext } from '../config';

const App = () => (
    <ThemeProvider>
        <AppThemed />
    </ThemeProvider>
);

const AppThemed = () => {
    const { theme } = useContext(ThemeContext);
    return (
        <View style={theme.styles.wrapper}>
            <TouchableOpacity onFocus={()=>console.log(1)} hasTVPreferredFocus style={{width: 50, height: 50, backgroundColor: 'red'}} />
            <TouchableOpacity onFocus={()=>console.log(2)} style={{width: 50, height: 50, backgroundColor: 'blue'}} />
        </View>
    );
};

export default App;
@NazarKuryl0 NazarKuryl0 added the bug Something isn't working label Feb 15, 2025
@ali-sao
Copy link

ali-sao commented Feb 19, 2025

The Touchable opacity is not focusable by default. This is not a bug.

@NazarKuryl0
Copy link
Author

@ali-sao, could you please provide sample code with navigation logic between 2 buttons on WebOS?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants