Skip to content

Commit

Permalink
fix: prevent custom config beyond container (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
907997375 committed Jun 18, 2023
1 parent c42450d commit 5a862ed
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/editor/editor.css
@@ -1,3 +1,11 @@
div.function > div.react-codemirror2 > div {
height: 100%;
}

div.function > div.react-codemirror2 {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
2 changes: 1 addition & 1 deletion src/editor/settings.tsx
Expand Up @@ -53,7 +53,7 @@ export function Settings(props: SettingsProps) {
<div style={{ display: open ? 'flex' : 'none', flexDirection: 'column', flexGrow: 1 }}>
<div style={{ display: 'flex', flexDirection: 'column', flexGrow: 1 }}>
<span style={{ margin: '0.5rem 0' }}>Custom config</span>
<CustomFunctionEditor style={{ flex: 1 }} text={props.text} onChange={props.onCustomConfigChange} />
<CustomFunctionEditor style={{ flex: 1, position: 'relative' }} text={props.text} onChange={props.onCustomConfigChange} />
</div>
</div>
</Container>
Expand Down

0 comments on commit 5a862ed

Please sign in to comment.