@one-commerce/sdk-core 2.1.0 → 2.1.1-KALET-149-autoheight-fix.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1334,10 +1334,9 @@
1334
1334
  }, {
1335
1335
  key: "sendFrameHeight",
1336
1336
  value: function sendFrameHeight() {
1337
- var body = document.body,
1338
- html = document.documentElement;
1339
- var height = Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight);
1340
- this.channel.postMessage(main.Message.FRAME_HEIGHT_CHANGE, height);
1337
+ // html element has scrollHeight same as height set on iframe so we cant use it
1338
+ var body = document.body;
1339
+ this.channel.postMessage(main.Message.FRAME_HEIGHT_CHANGE, body.scrollHeight);
1341
1340
  }
1342
1341
  }, {
1343
1342
  key: "initializeHeightObserver",