Skip to content

Commit

Permalink
fix(canvas): add 'maxWidth' and safe initial 'height' styles to 'canv…
Browse files Browse the repository at this point in the history
…as'.
  • Loading branch information
think-carlo committed Mar 6, 2025
1 parent 0ea6ce4 commit bbc5d43
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/core/components/Puck/components/Canvas/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ export const Canvas = () => {
className={getClassName("root")}
style={{
width: iframe.enabled ? ui.viewports.current.width : "100%",
height: zoomConfig.rootHeight,
maxWidth: "100%",
height: zoomConfig.rootHeight || "auto",
transform: iframe.enabled ? `scale(${zoomConfig.zoom})` : undefined,
transition: showTransition
? "width 150ms ease-out, height 150ms ease-out, transform 150ms ease-out"
Expand Down

0 comments on commit bbc5d43

Please sign in to comment.