WebView didn't get canGoBack correctly
See original GitHub issueHave you read the Bugs section of the Contributing to React Native Guide?
(Write your answer here.)
Environment
react-native -v
: react-native-cli: 2.0.1 react-native: 0.45.1node -v
: v8.1.2npm -v
: 5.0.3yarn --version
(if you use Yarn): 0.24.6
Then, specify:
- Target Platform (e.g. iOS, Android): iOS
- Development Operating System (e.g. macOS Sierra, Windows 10): macOS Sierra
- Build tools (Xcode or Android Studio version, iOS or Android SDK version, if relevant): iOS >8.0 Xcode 8.3.3
Steps to Reproduce
1.add an webView and a button call webView’s goBack 2.view some page and go back 3.check whether the canGoBack is right
Expected Behavior
the canGoBack is false when back to the first page the canGoBack is true when viewing deeper page
Actual Behavior
the canGoBack sometime is false at the page which is not the first loaded page.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:12 (2 by maintainers)
Top Results From Across the Web
webview goBack() does not work properly - Stack Overflow
canGoBack () returns false, then the app exits. But if it returns true, it calls the webView.goBack() , but that doesn't trigger any...
Read more >794020 - webview.canGoBack() always returning false even ...
b.com is loaded. Then webview.canGoBack() returns false instead of true. If it is the case, that's a bug. ``` Is it correct?
Read more >How to use WebView in React Native - Educative.io
To get started, we need to begin a new project with the React Native CLI. You can do this with Expo if you...
Read more >WebView history not working consistently when Chrome is ...
WebView's history and assoiciated canGoBack() and goBack() methods do not work properly when Google Chrome version 63.0.3239.111 is ...
Read more >Diving Deep into WebViews | Kodeco, the new raywenderlich ...
How to send and receive data with a webpage opened in WebView . When to use GestureRecognizer . Note: This tutorial assumes that...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Just confirming this is a bug.
To Reproduce:
What Happens: The console logs
false
as the next page begins to load, and thentrue
after the page has loadedWhat should happen: The console logs
true
as the next page begins to load andtrue
after the page has loadedStill happening, this especially hurts because there’s no other way (that I know of) to correctly tell if the current webview can go back.