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.

[WebView] There is an empty space showing when rendering WebView

See original GitHub issue

It does not happen on 0.6 and below. It only happens if I use 0.7 and above.

Here’s a sample code:

'use strict';

var React = require('react-native');

var {
  AppRegistry,
  View,
  WebView,
  Component
} = React;

class CustomWebView extends Component {
  reload() {
    this.refs.internalWebView.reload();
  }
  render() {
    return (
      <WebView ref="internalWebView" {...this.props}/>
    );
  }
}

var Sample1 = React.createClass({
  componentDidMount() {
    this.refs.AWESOME.reload();
  },
  render: function() {
    var url = "http://google.com";
    return (
      <CustomWebView ref="AWESOME" url={url}/>
    );
  }
});

AppRegistry.registerComponent('Sample1', () => Sample1);

screen shot 2015-07-20 at 5 16 04 pm

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
idecommented, Jul 20, 2015

@alinz can you try setting automaticallyAdjustContentInsets={false}?

0reactions
idecommented, Jul 21, 2015

@chirag I opened a PR to discuss this but I don’t know if it’s the best solution especially considering Android. My sense is it that it’s a useful prop but currently is too entangled with native code, and instead should optimize for JS chrome components like Navigator.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Problem with extra space at the bottom of android Webview
The Problem is HTML content is displayed along with some extra space at the bottom, I could not understand why the white space...
Read more >
Webview showing blank spaces after updating Xamarin. ...
We are using WebView in Xamarin.Forms using custom renderer. When we have updated Xamarin.Forms version from 4.7.0.1260 to 5.0.0.1874 in our ...
Read more >
WkWebView always comes up with white background?
There is a white flash when the app first loads, but that is from the launch screen. I built a simple app that...
Read more >
`<webview>` Tag | Electron
Display external web content in an isolated frame and process. Process: Renderer This class is not exported from the 'electron' module. It is...
Read more >
Managing WebView objects
Caution: If your app continues executing after the renderer process goes away, the associated instance of WebView cannot be reused, no matter ...
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