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 not showing loading indicator when calling reload() #11013

Closed
fschai89 opened this issue Nov 18, 2016 · 5 comments
Closed

Webview not showing loading indicator when calling reload() #11013

fschai89 opened this issue Nov 18, 2016 · 5 comments
Labels
Help Wanted :octocat: Issues ideal for external contributors. Resolution: Locked This issue was locked by the bot.

Comments

@fschai89
Copy link

Description

Webview not showing loading indicator when calling reload() like below code, this only happen in android, IOS not problem.

this.refs[WEBVIEW_REF].reload();

Reproduction

`render() {
return (

  <View style={ { flex: 1 } }>
      <WebView
          ref={ WEBVIEW_REF }
          style={ { flex: 1, marginTop: 50 } }
          source={ { uri: this.props.url } }
          scalesPageToFit={ this.props.scalesPageToFit }
          startInLoadingState={ this.props.startInLoadingState } />
  </View>
  );

};`

Solution

Please fix the so when we call reload, it show the loading indicator

Additional Information

  • React Native version: 0.37.0
  • Platform: android
  • Operating System: MacOS
@mkonicek
Copy link
Contributor

Does the Android WebView ever show a loading indicator? It might not be implemented. Please send a PR to fix this.

@mkonicek mkonicek added the Help Wanted :octocat: Issues ideal for external contributors. label Nov 28, 2016
@fschai89
Copy link
Author

fschai89 commented Nov 28, 2016 via email

@hramos
Copy link
Contributor

hramos commented May 25, 2017

Closing this issue because it has been inactive for a while. If you think it should still be opened let us know why.

@hramos hramos closed this as completed May 25, 2017
@hramos hramos added the Icebox label May 26, 2017
@DracoBlue
Copy link
Contributor

@hramos this is still an issue on android. We will try to fix this and send you a PR.

@DracoBlue
Copy link
Contributor

Should be fixed with #15538

facebook-github-bot pushed a commit that referenced this issue Aug 17, 2017
Summary:
This commit enables state WebViewState before triggering reload on WebView. This will (if defined) trigger the loading screen again.

On iOS the LoadingIndicator will be called whenever you reload the WebView. On Android this feature is missing (see #11013). This PR adds this behaviour.

Important: One might think that "onLoadStart" is the right area to add this code, but on Android onLoadStart will also trigger for sub-resources -> the loading screen will also appear when loading iframes on the same page. I expect thats why this was not added in first place.

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Bonus points for screenshots and videos!)
Closes #15538

Differential Revision: D5653257

Pulled By: hramos

fbshipit-source-id: 908b82ddaf2c34048bcb833bc07e03ab68d09467
@facebook facebook locked as resolved and limited conversation to collaborators Jul 19, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Help Wanted :octocat: Issues ideal for external contributors. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

5 participants