ソースを参照

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 年 前
コミット
d156ce98fe
共有2 個のファイルを変更した8 個の追加2 個の削除を含む
  1. 7
    1
      ios/RNCWKWebView.m
  2. 1
    1
      package.json

+ 7
- 1
ios/RNCWKWebView.m ファイルの表示

294
     [_webView loadHTMLString:@"" baseURL:nil];
294
     [_webView loadHTMLString:@"" baseURL:nil];
295
     return;
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
 -(void)setHideKeyboardAccessoryView:(BOOL)hideKeyboardAccessoryView
306
 -(void)setHideKeyboardAccessoryView:(BOOL)hideKeyboardAccessoryView

+ 1
- 1
package.json ファイルの表示

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