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

Android: Webview startInLoadingState interferes with sibling elements which have a higher z-index #11976

Closed
martsie opened this issue Jan 19, 2017 · 2 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@martsie
Copy link

martsie commented Jan 19, 2017

Description

Any view that is a sibling of a WebView in Android gets removed if it's zIndex is higher than that of the WebView and the WebView has the property startInLoadingState.

Reproduction

webview-sibling-issue

In the below code, simply removing the zIndex attribute of the sibling style fixes the issue.

/**
 * Sample React Native App
 * https://github.com/facebook/react-native
 * @flow
 */

import React, { Component } from 'react';
import {
  AppRegistry,
  StyleSheet,
  Text,
  WebView,
  View,
} from 'react-native';

export default class webviewloader extends Component {
  render() {
    return (
      <View style={styles.container}>
        <Text style={styles.sibling}>Test sibling view</Text>
        <WebView
          source={{uri: 'https://github.com/facebook/react-native'}}
          startInLoadingState
          />
      </View>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    flexDirection: 'column',
  },
  sibling: {
    zIndex: 1,
  },
});

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

Solution

May be related to #8968

Additional Information

  • React Native version: 0.4.0
  • Platform: Android
  • Operating System: MacOS
@hramos
Copy link
Contributor

hramos commented May 25, 2017

We're cutting down on the number of outstanding issues, in order to allow us to focus. I'm closing this issue because it has been open for over 60 days with no activity. If you think it should still be opened let us know why. PRs are always welcome.

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

How can I increment in this loadIndicator Size

@facebook facebook locked as resolved and limited conversation to collaborators May 29, 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
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

5 participants