Skip to content

Unsupported top level event type "topLoadingStart" dispatched in Custom WebView #16848

@juangl

Description

@juangl

Is this a bug report?

I believe so.

Have you read the Contributing Guidelines?

Yes.

Environment

Environment:
OS: macOS Sierra 10.12.6
Node: 8.7.0
Yarn: 1.2.1
npm: 5.4.2
Watchman: 4.7.0
Xcode: Xcode 9.1 Build version 9B55
Android Studio: 2.3 AI-162.4069837

Packages: (wanted => installed)
react: 16.0.0 => 16.0.0
react-native: 0.50.3 => 0.50.3

Target Platform: iOS (11.1)

Steps to Reproduce

We implemented a Custom WebView. It used to work in RN 0.49 (we were using the components/WebView.ios.js from master). I'm not an Objective-C developer and probably I'm doing something wrong. Our implementation looks like this:

// RCTCustomWebViewManager.h
#import <React/RCTWebViewManager.h>
#import <React/RCTWebView.h>

@interface RCTCustomWebViewManager : RCTWebViewManager

@end


// RCTCustomWebViewManager.m
#import "RCTCustomWebViewManager.h"

@interface RCTCustomWebViewManager () <RCTWebViewDelegate>

@end

@implementation RCTCustomWebViewManager { }
RCT_EXPORT_MODULE()
RCT_REMAP_VIEW_PROPERTY(keyboardDisplayRequiresUserAction, _webView.keyboardDisplayRequiresUserAction, BOOL)

- (UIView *)view
{
  RCTWebView *webView = [RCTWebView new];
  webView.delegate = self;
  return webView;
}

@end

Expected Behavior

I expect it works.

Actual Behavior

simulator screen shot - iphone 6 - 2017-11-15 at 17 19 15

Reproducible Demo

https://github.com/juangl/with-custom-webview

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: WebViewRelated to the WebView component.StaleThere has been a lack of activity on this issue and it may be closed soon.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions