react-native-webview-crosswalk icon indicating copy to clipboard operation
react-native-webview-crosswalk copied to clipboard

cannot reload and navigate

Open timofischer81 opened this issue 9 years ago • 3 comments

I try to implement a reload button but I get the error "undefined is not a function (evaluating '_react2.default.findNodeHandle(this.refs[WEBVIEW_REF])') when hitting it. What am I doing wrong? Thanks!

var WEBVIEW_REF = 'crosswalkWebView';

class crosswalkTest extends Component {

_refreshBrowser() {
        this.refs[WEBVIEW_REF].reload();
    }

    render() {
         return (
            <View style={[styles.container]}>
                <View style={[styles.addressBarRow]}>
                    <TouchableOpacity
                        onPress={this._refreshBrowser.bind(this)}
                        style={styles.navButton}>
                        <Icon name="refresh" size={20} color="grey" style={styles.iconStyle} />
                    </TouchableOpacity>
                </View>

               <CrosswalkWebView
                   ref={WEBVIEW_REF}
                   style={styles.webViewAndroid}
                   localhost={false}
                   url={this.state.url}
               />
            </View>
         );
      }
}

timofischer81 avatar Jun 04 '16 15:06 timofischer81

This might be related to @ruqqq's fix here: https://github.com/ruqqq/react-native-webview-crosswalk/commit/71fb00efb50dc10de440941c03e1949e2165bb1e

Can anyone confirm?

jordaaash avatar Jun 04 '16 18:06 jordaaash

I get the same error if I apply that fix.

timofischer81 avatar Jun 04 '16 19:06 timofischer81

Looking into this further.

jordaaash avatar Jun 04 '16 21:06 jordaaash