iou90 4 년 전
부모
커밋
6a2defdf53
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3
    3
      autoHeightWebView/utils.js

+ 3
- 3
autoHeightWebView/utils.js 파일 보기

21
       return;
21
       return;
22
     }
22
     }
23
     clearInterval(updateSizeInterval)
23
     clearInterval(updateSizeInterval)
24
-    height = ${element}.offsetHeight || window.innerHeight;
25
-    width = ${element}.offsetWidth || window.innerWidth;
24
+    height = ${element}.offsetHeight || document.documentElement.offsetHeight;
25
+    width = ${element}.offsetWidth || document.documentElement.offsetWidth;
26
     window.ReactNativeWebView.postMessage(JSON.stringify({ width: width, height: height }));
26
     window.ReactNativeWebView.postMessage(JSON.stringify({ width: width, height: height }));
27
   }
27
   }
28
   `;
28
   `;
52
   window.addEventListener('load', updateSize);
52
   window.addEventListener('load', updateSize);
53
   window.addEventListener('resize', updateSize);
53
   window.addEventListener('resize', updateSize);
54
   ${domMutationObserveScript}
54
   ${domMutationObserveScript}
55
-  ${Platform.OS === 'ios' ? makeScalePageToFit(zoomable) : ''}
55
+  ${makeScalePageToFit(zoomable)}
56
   updateSize();
56
   updateSize();
57
   `;
57
   `;
58
 
58