question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Disable swipe back function

See original GitHub issue

Version

  • react-native-router-flux v4.0.0 @beta.21
  • react-native v0.54.3

Expected behaviour

Disable swipe back function

Actual behaviour

I can’t make it work

Steps to reproduce

I have tryied:

  1. type=“reset”, but it minimizes the app
  2. panHandlers={null}
  3. gesturesEnabled={false}

but nothing works for me. Can someone help me?

Code:

<Router>
            <Stack key="root">
              <Scene key="Inicio" component={Inicio} titleStyle={{color: '#FFF', fontSize: 18}} navigationBarStyle={{ backgroundColor: '#4c486f' }} title="All About My Pet" type="reset"/>
              <Scene key="FormLogin" component={FormLogin} titleStyle={{color: '#FFF', fontSize: 18}} navigationBarStyle={{ backgroundColor: '#4c486f' }} title="Faça seu Login"/>
              <Scene key="FormCadastro" component={FormCadastro} titleStyle={{color: '#FFF', fontSize: 18}} title navigationBarStyle={{ backgroundColor: '#066c76' }} title="Cadastro"/>
            </Stack>
</Router>

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

26reactions
adeamos83commented, Sep 26, 2018

You must use “drawerLockMode=‘locked-closed’ gesturesEnabled={false}” together inorder for the swipe action to be fully disabled

<Scene key="home" drawerLockMode='locked-closed' gesturesEnabled={false} component={HomeContainer}/>

0reactions
AliUZARcommented, Apr 8, 2020

You must use “drawerLockMode=‘locked-closed’ gesturesEnabled={false}” together inorder for the swipe action to be fully disabled

<Scene key="home" drawerLockMode='locked-closed' gesturesEnabled={false} component={HomeContainer}/>

Thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

How To Disable Swipe To Go Back In Chrome On Touch ...
Open the dropdown under the 'Overscroll history navigation ' flag, and select 'Disable' from the options. Relaunch Chrome. You will no longer be ......
Read more >
react navigation v6 and v5, Disable swipe back action
1. set getureEnabled to false on any route you want to disable swiping. · As the answers mention, you should pass gestureEnabled: false...
Read more >
How do i disable swipe to go back a page … - Apple Community
How do i disable swipe to go back a page in safari for the iphone. ... I too would like to know how...
Read more >
Disable swipe to go back in Edge for Mac - Microsoft Community
Is there a way to disable swipe to navigate in Edge on Mac? ... This should disable the swipe to go back function...
Read more >
How to disable swipe navigation on Edge for Mac - Ask Different
I found a solution in the trackpad settings. In System Preferences go to Trackpad > More Gestures. Then disable "Swipe between pages".
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found