Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,10 @@ const DeviceFrame = ({

return (
<div
className={cx('group relative h-fit', {
'w-52': isRestrictedMinimumDeviceSize,
})}
className="group relative h-fit"
style={{
minWidth: isRestrictedMinimumDeviceSize ? Math.max(scaledWidth, 208) : undefined,
}}
>
{/* The label row is also the canvas drag handle, so it stays in the
tree even when name and dims are toggled off. */}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,18 @@ const useWebviewLifecycle = (
return undefined;
}
const hideScrollbars = () => {
// Zero-size scrollbars keep the layout viewport steady; hiding them
// without taking the space still shifted a scaled mobile preview.
webview.insertCSS(`
::-webkit-scrollbar {
display: none;
} `);
html, body {
scrollbar-width: none;
}
::-webkit-scrollbar {
width: 0px !important;
height: 0px !important;
display: none !important;
}
`);
};
webview.addEventListener('dom-ready', hideScrollbars);
return () => {
Expand Down
Loading