We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6ebd625 commit 65bf9b3Copy full SHA for 65bf9b3
1 file changed
src/server/ui/pages/Preview.vue
@@ -241,7 +241,11 @@ function updateIframeContentHeight() {
241
242
// Temporarily collapse to measure true content height
243
iframe.style.height = '0'
244
- iframeContentHeight.value = doc.documentElement.scrollHeight
+ const contentHeight = doc.documentElement.scrollHeight
245
+ // Fill the preview viewport when the email is shorter than it; grow past it
246
+ // (and let the ScrollArea scroll) when the email is taller.
247
+ const availableHeight = viewport?.clientHeight ?? 0
248
+ iframeContentHeight.value = Math.max(contentHeight, availableHeight)
249
iframe.style.height = `${iframeContentHeight.value}px`
250
251
// Restore scroll position
0 commit comments