Skip to content

Commit 1a5e7e9

Browse files
committed
Fix scrolling of embed
1 parent bdc8188 commit 1a5e7e9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/app/src/embed/components/Sidebar/elements.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
// @flow
22
import styled from 'styled-components';
3+
import { isIOS } from '@codesandbox/common/lib/utils/platform';
34

45
export const Container = styled.div`
56
flex: 250px;
67
width: 250px;
7-
height: 100%;
8+
/* There is a bug with ios that causes the sidebar to be longer than the preview, when you then
9+
* scroll the preview it scrolls the editor down (page is longer). If I set this to 100% scrolling
10+
* is broken in Chrome though. That's why we have this check */
11+
height: ${isIOS ? '100%' : '100vh'};
812
color: rgba(255, 255, 255, 0.8);
913
z-index: 10;
1014
background-color: ${props => props.theme.sidebar};

0 commit comments

Comments
 (0)