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

WebView didn't get canGoBack correctly #14889

Closed
silver6wings opened this issue Jul 7, 2017 · 12 comments
Closed

WebView didn't get canGoBack correctly #14889

silver6wings opened this issue Jul 7, 2017 · 12 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@silver6wings
Copy link

Have you read the Bugs section of the Contributing to React Native Guide?

(Write your answer here.)

Environment

  1. react-native -v:
    react-native-cli: 2.0.1
    react-native: 0.45.1
  2. node -v:
    v8.1.2
  3. npm -v:
    5.0.3
  4. yarn --version (if you use Yarn):
    0.24.6

Then, specify:

  1. Target Platform (e.g. iOS, Android):
    iOS
  2. Development Operating System (e.g. macOS Sierra, Windows 10):
    macOS Sierra
  3. 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.

@hramos
Copy link
Contributor

hramos commented Jul 7, 2017

The bug report is missing some necessary details. Please read the contributing guide and open a new issue, thanks!

@hramos hramos closed this as completed Jul 7, 2017
@0x5e
Copy link

0x5e commented Oct 20, 2017

same problem.
canGoBack sometimes correct but sometimes wrong.

@0x5e
Copy link

0x5e commented Oct 20, 2017

When the second page is loading, I get onNavigationStateChange callback contains wrong canGoBack as false, after loading finished, I get correct canGoBack. Tested on iOS 10.0.3 & Android 7.1.1, RN 0.49.3.

@mmiani
Copy link

mmiani commented Nov 23, 2017

same issue as @0x5e in RN 0.50.3

@ngankt2
Copy link

ngankt2 commented Nov 27, 2017

+1

@RLesser
Copy link

RLesser commented Dec 9, 2017

Still happening, this especially hurts because there's no other way (that I know of) to correctly tell if the current webview can go back.

@ashconnell
Copy link

ashconnell commented Dec 22, 2017

Just confirming this is a bug.

To Reproduce:

  1. Instantiate a WebView like so
    <WebView
        source={{ uri: 'https://www.google.com' }}
        onNavigationStateChange={ ({ canGoback }) => console.log(canGoBack) }
    />
  1. Click anything (eg the banner image) to navigate to a new page

What Happens:
The console logs false as the next page begins to load, and then true after the page has loaded

What should happen:
The console logs true as the next page begins to load and true after the page has loaded

@mmorcc
Copy link

mmorcc commented Jan 3, 2018

in android the console logs true as the next page begins to load and true after the page has loaded
in ios is wrong

@sapjax
Copy link

sapjax commented Mar 12, 2018

@hramos Please open this bug again 🤔

@hramos
Copy link
Contributor

hramos commented Mar 12, 2018

Please open a new issue.

@iamdurui
Copy link

When the second page is loading, I don't get onNavigationStateChange callback , Tested on iOS 10.3.3 , RN 0.46.2, but the Android don't have this bug

@peanutli
Copy link

Not fist page,iOS 11.0 no have this problem,canGoback == true,but iOS 11.4 have this problem, canGoback == false.

@facebook facebook locked as resolved and limited conversation to collaborators Jul 7, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests