Browse Source

Update RNCWebViewManager.java

Thibault Malbranche 5 years ago
parent
commit
5d5f598ae4

+ 5
- 3
android/src/main/java/com/reactnativecommunity/webview/RNCWebViewManager.java View File

@@ -272,6 +272,8 @@ public class RNCWebViewManager extends SimpleViewManager<WebView> {
272 272
 
273 273
     @Override
274 274
     protected void onSizeChanged(int w, int h, int ow, int oh) {
275
+      super.onSizeChanged(w, h, ow, oh);
276
+
275 277
       if (sendContentSizeChangeEvents) {
276 278
         dispatchEvent(
277 279
           this,
@@ -492,15 +494,15 @@ public class RNCWebViewManager extends SimpleViewManager<WebView> {
492 494
 
493 495
         //Attempt to add cookie, if it exists
494 496
         URL urlObj = null;
495
-        try {  
497
+        try {
496 498
           urlObj = new URL(url);
497 499
           String baseUrl = urlObj.getProtocol() + "://" + urlObj.getHost();
498
-          String cookie = CookieManager.getInstance().getCookie(baseUrl);  
500
+          String cookie = CookieManager.getInstance().getCookie(baseUrl);
499 501
           request.addRequestHeader("Cookie", cookie);
500 502
           System.out.println("Got cookie for DownloadManager: " + cookie);
501 503
         } catch (MalformedURLException e) {
502 504
           System.out.println("Error getting cookie for DownloadManager: " + e.toString());
503
-          e.printStackTrace();  
505
+          e.printStackTrace();
504 506
         }
505 507
 
506 508
         //Finish setting up request