You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently only seeing this on Windows, we have a MacOS application (via Catalyst so technically an iOS application) that is unaffected and the snack I linked doesn't actually demo the issue since it doesn't allow you to run on Windows.
If you start on the root screen of a stack navigator, navigate to a different screen, then hit the back button (or navigate to the start by any other means), any header buttons on the root screen will become unclickable. Other screens seem unaffected.
This seems similar to #7052 but since this is Windows only I figured I'd make a separate issue.
Current behavior
I'm currently only seeing this on Windows, we have a MacOS application (via Catalyst so technically an iOS application) that is unaffected and the snack I linked doesn't actually demo the issue since it doesn't allow you to run on Windows.
If you start on the root screen of a stack navigator, navigate to a different screen, then hit the back button (or navigate to the start by any other means), any header buttons on the root screen will become unclickable. Other screens seem unaffected.
This seems similar to #7052 but since this is Windows only I figured I'd make a separate issue.
Minimal repro that is also my example code:
export const Screen1 = ({
navigation,
route,
}: StackScreenProps<any, 'Screen1'>) => {
return <Button style={styles.navButtons} title="Click me to go to screen 2!" onPress={() => navigation.navigate('Screen2')} />;
}
export const Screen2 = ({
navigation,
route,
}: StackScreenProps<any, 'Screen2'>) => {
return <Button style={styles.navButtons} title="Click me to go to screen 1!" onPress={() => navigation.navigate('Screen1')} />;
};
const App = () => {
const headerButton = <Button title={"Do I work?"} onPress={() => alert("I do!") } />;
return (
<Stack.Navigator screenOptions={{ headerMode: 'screen', headerRight: () => headerButton}}>
<Stack.Screen name="Screen1" component={Screen1} />
<Stack.Screen name="Screen2" component={Screen2} />
</Stack.Navigator>
);
};
export default App;
Screen.Recording.2022-04-27.at.5.40.03.PM.mov
Expected behavior
The obvious, but that header buttons work on the root screen
Reproduction
https://snack.expo.dev/_dbMNoLpW
Platform
Packages
Environment
The text was updated successfully, but these errors were encountered: