iou90 5 年之前
父節點
當前提交
6650397924
共有 1 個檔案被更改,包括 2 行新增1 行删除
  1. 2
    1
      autoHeightWebView/index.js

+ 2
- 1
autoHeightWebView/index.js 查看文件

48
       const { height, width, zoomedin } = data;
48
       const { height, width, zoomedin } = data;
49
       !scrollEnabled && scrollEnabledWithZoomedin && setScrollable(!!zoomedin);
49
       !scrollEnabled && scrollEnabledWithZoomedin && setScrollable(!!zoomedin);
50
       const { height: previousHeight, width: previousWidth } = size;
50
       const { height: previousHeight, width: previousWidth } = size;
51
-      isSizeChanged({ height, previousHeight, width, previousWidth }) &&
51
+      !zoomedin && webView.current.zoomedin === zoomedin && isSizeChanged({ height, previousHeight, width, previousWidth }) &&
52
         setSize({
52
         setSize({
53
           height,
53
           height,
54
           width
54
           width
55
         });
55
         });
56
+      webView.current.zoomedin = zoomedin;
56
     };
57
     };
57
 
58
 
58
     const currentScrollEnabled = scrollEnabled === false && scrollEnabledWithZoomedin ? scrollable : scrollEnabled;
59
     const currentScrollEnabled = scrollEnabled === false && scrollEnabledWithZoomedin ? scrollable : scrollEnabled;