Skip to content

Commit

Permalink
fix(codemirror): add workaround IME position of CodeMirror
Browse files Browse the repository at this point in the history
  • Loading branch information
azu committed Jan 10, 2017
1 parent daacaed commit a25983b
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ export default class TextlintEditor extends React.Component {
if (this._CodeMirror) {
const codeMirror = this._CodeMirror.getCodeMirror();
codeMirror.getScrollerElement().style.minHeight = "30em";
// Workaround
// https://github.com/codemirror/CodeMirror/issues/4089
// https://github.com/BoostIO/Boostnote/commit/8f1c198406d68ef7818a84f4201c6df446e14592
codeMirror.getInputField().style.marginBottom = "-2em";
codeMirror.refresh();
}
}
Expand All @@ -95,6 +99,7 @@ export default class TextlintEditor extends React.Component {
lineNumbers: true,
lineWrapping: true,
mode: "markdown",
inputStyle: "textarea",
extraKeys: {"Alt-F": "findPersistent"},
gutters: ["CodeMirror-lint-markers"],
lint: {
Expand Down

0 comments on commit a25983b

Please sign in to comment.