Set Height limit to frame.
This commit is contained in:
1 parent
ec61e01950
commit
1a19d63192
2 files changed
+6
-2
No files matched your search
@@ -8,7 +8,11 @@ export function setupFrameResizeListener() {
|
||||
}
|
||||
|
||||
const data = JSON.parse(e.data.substring(RESIZE_CODE.length))
|
||||
previewFrame.style.height = data.height + 'px'
|
||||
let height = Number.parseInt(data.height)
|
||||
if (height > 20000) {
|
||||
height = 20000; // Limit max height.
|
||||
}
|
||||
previewFrame.style.height = height + 'px'
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user