We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 12ab73e commit 8ba36caCopy full SHA for 8ba36ca
src/inapp/utils.ts
@@ -423,8 +423,15 @@ export const paintIFrame = (
423
};
424
425
if (position !== 'Full') {
426
+ const iframeHeight =
427
+ iframe.contentWindow?.document?.body?.scrollHeight;
428
+ /*
429
+ For web in-app messages created with WYSIWYG editor,
430
+ there is 8px margin all around the iframe document body.
431
+ Add 16px to the iframe height to eliminate scrollbar.
432
+ */
433
iframe.style.height =
- (iframe.contentWindow?.document?.body?.scrollHeight || 0) + 'px';
434
+ ((iframeHeight && iframeHeight + 16) || 0) + 'px';
435
}
436
437
clearTimeout(timeout);
0 commit comments