@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.
@@ -1328,10 +1328,9 @@ var Sdk = /*#__PURE__*/function (_Events) {
1328
1328
  }, {
1329
1329
  key: "sendFrameHeight",
1330
1330
  value: function sendFrameHeight() {
1331
- var body = document.body,
1332
- html = document.documentElement;
1333
- var height = Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight);
1334
- this.channel.postMessage(main.Message.FRAME_HEIGHT_CHANGE, height);
1331
+ // html element has scrollHeight same as height set on iframe so we cant use it
1332
+ var body = document.body;
1333
+ this.channel.postMessage(main.Message.FRAME_HEIGHT_CHANGE, body.scrollHeight);
1335
1334
  }
1336
1335
  }, {
1337
1336
  key: "initializeHeightObserver",