From 8f1c198406d68ef7818a84f4201c6df446e14592 Mon Sep 17 00:00:00 2001 From: Dick Choi Date: Tue, 18 Oct 2016 13:42:10 +0900 Subject: [PATCH] hot fix: Wrong behavior with Japanese IME keyboard --- browser/components/CodeEditor.js | 2 +- browser/main/global.styl | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/browser/components/CodeEditor.js b/browser/components/CodeEditor.js index 03e458c7..dde3d3c8 100644 --- a/browser/components/CodeEditor.js +++ b/browser/components/CodeEditor.js @@ -50,7 +50,7 @@ export default class CodeEditor extends React.Component { tabSize: this.props.indentSize, indentWithTabs: this.props.indentType !== 'space', keyMap: 'sublime', - inputStyle: 'contenteditable', + inputStyle: 'textarea', extraKeys: { Tab: function (cm) { if (cm.somethingSelected()) cm.indentSelection('add') diff --git a/browser/main/global.styl b/browser/main/global.styl index 8ff0b134..b0b643b6 100644 --- a/browser/main/global.styl +++ b/browser/main/global.styl @@ -92,6 +92,8 @@ body[data-theme="dark"] font-family inherit !important line-height 1.4em height 100% +.CodeMirror > div > textarea + margin-bottom -1em .CodeMirror-focused .CodeMirror-selected background #B1D7FE .CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection