diff --git a/packages/ui-default/components/highlighter/highlighter.page.styl b/packages/ui-default/components/highlighter/highlighter.page.styl index 53ad8f6f2..62cd14c10 100644 --- a/packages/ui-default/components/highlighter/highlighter.page.styl +++ b/packages/ui-default/components/highlighter/highlighter.page.styl @@ -26,8 +26,8 @@ code white-space: pre .sample > .toolbar - right: 12px !important - top: 59px !important + right: 0.7em !important + top: 3.7em !important .toolbar position: absolute diff --git a/packages/ui-default/components/scratchpad/ScratchpadToolbarContainer.jsx b/packages/ui-default/components/scratchpad/ScratchpadToolbarContainer.jsx index da405ab2f..3977e7c83 100644 --- a/packages/ui-default/components/scratchpad/ScratchpadToolbarContainer.jsx +++ b/packages/ui-default/components/scratchpad/ScratchpadToolbarContainer.jsx @@ -88,6 +88,8 @@ export default connect(mapStateToProps, mapDispatchToProps)(class ScratchpadTool if (UiContext.domain.langs && !`,${UiContext.domain.langs},`.includes(`,${key},`)) continue; LANGS[key] = window.LANGS[key]; } + const keys = Object.keys(LANGS); + if (!keys.includes(this.props.editorLang)) this.props.setEditorLanguage(keys[0]); return ( ", "license": "AGPL-3.0", "main": "hydro.js",