Browse Source

Merge branch 'fix-android-overflow-and-adjust-default-render-loading-error' of https://github.com/react-native-community/react-native-webview into fix-android-overflow-and-adjust-default-render-loading-error

Thibault Malbranche 6 years ago
parent
commit
d156ce98fe
2 changed files with 8 additions and 2 deletions
  1. 7
    1
      ios/RNCWKWebView.m
  2. 1
    1
      package.json

+ 7
- 1
ios/RNCWKWebView.m View File

@@ -294,7 +294,13 @@ static NSURLCredential* clientAuthenticationCredential;
294 294
     [_webView loadHTMLString:@"" baseURL:nil];
295 295
     return;
296 296
   }
297
-  [_webView loadRequest:request];
297
+  if (request.URL.host) {
298
+    [_webView loadRequest:request];
299
+  }
300
+  else {
301
+    [_webView loadFileURL:request.URL allowingReadAccessToURL:request.URL];
302
+  }
303
+
298 304
 }
299 305
 
300 306
 -(void)setHideKeyboardAccessoryView:(BOOL)hideKeyboardAccessoryView

+ 1
- 1
package.json View File

@@ -8,7 +8,7 @@
8 8
     "Thibault Malbranche <malbranche.thibault@gmail.com>"
9 9
   ],
10 10
   "license": "MIT",
11
-  "version": "5.5.0",
11
+  "version": "5.5.1",
12 12
   "homepage": "https://github.com/react-native-community/react-native-webview#readme",
13 13
   "scripts": {
14 14
     "ci": "CI=true && yarn lint && yarn test",