Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

235
Views
HeaderRight Buttons are not clickable (React Native)

I am experiencing an odd bug with the React Native Navigation v5 headerRight Buttons. I currently have a TouchableOpacity set as a headerRight component in the react native navigation screen; however, the onPress event is not being triggered. There seems to be an invisible object in the middle of the header (title area) that has an absolute position, which prevents the onPress event from being registered. I tried playing around with the zIndex and headerMode values; however, the button is still not pressable. I can only press the button when it is placed on the far right of the screen (i.e. marginRight: 0). Any help would be greatly appreciated.

For reference, I am encountering the same issues as the following thread: https://github.com/react-navigation/react-navigation/issues/7052

Example of my Code

<StackNavigator.Navigator headerMode='screen'>
  <StackNavigator.Screen
    name='Home'
    component={HomeScreen}
    options={{
      headerRight: () => (
        <TouchableOpacity
          onPress={() => {}}
        >
          <Text>Button Text</Text>
        </TouchableOpacity>
      ),
    }}
  />
</StackNavigator.Navigator>
about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

Updating to the following packages seems to have resolved it for me:

"@react-navigation/stack": "5.9.3",
"@react-navigation/drawer": "5.9.3",
"@react-navigation/native": "5.7.4",
about 4 years ago · Juan Pablo Isaza Report

0

Try to give higher values to zIndex may be 100 or give headerMode: float if that not also not works try updating your packages .

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!