SimpleMDE don't trap keyboard

This commit is contained in:
Chi Vinh Le
2017-11-20 18:14:17 +01:00
parent 8f0eef7cb5
commit 67f3f8cdef
2 changed files with 5 additions and 1 deletions
@@ -30,7 +30,6 @@
margin-right: 10px;
position: relative;
border: solid 2px #F0F0F0;
transition: border 0.3s cubic-bezier(.4,0,.2,1);
outline: 0;
&:hover {
@@ -107,6 +107,11 @@ export default class MarkdownEditor extends Component {
...config,
element: this.textarea,
});
// Don't trap the key, to stay accessible.
this.editor.codemirror.options.extraKeys['Tab'] = false;
this.editor.codemirror.options.extraKeys['Shift-Tab'] = false;
this.editor.codemirror.on('change', this.onChange);
}