Skip to content

Commit bd0f5e9

Browse files
authored
Fix safari 10 styling (codesandbox#566)
* Fix safari styling * Show tabs in embed
1 parent 5294f5c commit bd0f5e9

File tree

4 files changed

+23
-64
lines changed

4 files changed

+23
-64
lines changed

packages/app/src/app/components/CodeEditor/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,11 @@ export default class CodeEditor extends React.PureComponent<Props, State> {
131131
style={{
132132
height: props.height || '100%',
133133
width: props.width || '100%',
134-
position: 'relative',
134+
position: 'absolute',
135+
top: 0,
136+
left: 0,
137+
right: 0,
138+
bottom: 0,
135139
}}
136140
>
137141
{config &&

packages/app/src/app/pages/Sandbox/Editor/OwnedSandbox.js

Lines changed: 0 additions & 51 deletions
This file was deleted.

packages/app/src/app/pages/Sandbox/Editor/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ function ContentSplit({ signals, store, match }) {
6868
: 'hidden',
6969
maxWidth: store.workspace.openedWorkspaceItem ? 'inherit' : 0,
7070
}}
71+
pane2Style={{
72+
height: '100%',
73+
}}
7174
>
7275
{store.workspace.openedWorkspaceItem && <Workspace />}
7376
<Content match={match} />

packages/app/src/embed/components/Content/index.js

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -342,18 +342,21 @@ export default class Content extends React.PureComponent<Props, State> {
342342
);
343343
})}
344344
</Tabs>
345-
346-
<CodeEditor
347-
onInitialized={this.onCodeEditorInitialized}
348-
currentModule={currentModule || mainModule}
349-
sandbox={sandbox}
350-
settings={this.getPreferences()}
351-
canSave={false}
352-
onChange={this.setCode}
353-
onModuleChange={this.setCurrentModule}
354-
onUnMount={this.onCodeEditorUnMount}
355-
highlightedLines={this.props.highlightedLines}
356-
/>
345+
<div
346+
style={{ position: 'relative', width: '100%', height: '100%' }}
347+
>
348+
<CodeEditor
349+
onInitialized={this.onCodeEditorInitialized}
350+
currentModule={currentModule || mainModule}
351+
sandbox={sandbox}
352+
settings={this.getPreferences()}
353+
canSave={false}
354+
onChange={this.setCode}
355+
onModuleChange={this.setCurrentModule}
356+
onUnMount={this.onCodeEditorUnMount}
357+
highlightedLines={this.props.highlightedLines}
358+
/>
359+
</div>
357360
</Split>
358361
)}
359362

0 commit comments

Comments
 (0)