From 9d389d972e1b1ec8c64507be924e3ee87c0dbb8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9ry=20Debongnie?= Date: Mon, 1 Apr 2019 10:55:15 +0200 Subject: [PATCH] fix: a few small bugs, restore proper tab on layout change --- playground.css | 1 + src/app.js | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/playground.css b/playground.css index 5a0c6cca..d0ec0ff4 100644 --- a/playground.css +++ b/playground.css @@ -40,6 +40,7 @@ body { flex: 0 0 50px; flex-direction: row-reverse; align-items: center; + user-select: none; } .menubar select { diff --git a/src/app.js b/src/app.js index c736d524..64260057 100644 --- a/src/app.js +++ b/src/app.js @@ -44,9 +44,9 @@ class TabbedEditor extends Component { // remove this for xml/css (?) this.editor.session.setOption("useWorker", false); this.editor.setValue(this.props[this.state.currentTab], -1); - this.editor.setFontSize("14px"); + this.editor.setFontSize("13px"); this.editor.setTheme("ace/theme/monokai"); - this.editor.session.setMode("ace/mode/javascript"); + this.editor.session.setMode(MODES[this.state.currentTab]); this.editor.on("blur", () => { const editorValue = this.editor.getValue(); const propsValue = this.props[this.state.currentTab]; @@ -129,7 +129,7 @@ const TEMPLATE = `
- +