diff --git a/client/src/templates/Challenges/classic/Editor.js b/client/src/templates/Challenges/classic/Editor.js index b384c4251b..b9d8fd1eda 100644 --- a/client/src/templates/Challenges/classic/Editor.js +++ b/client/src/templates/Challenges/classic/Editor.js @@ -85,10 +85,6 @@ class Editor extends Component { this._editor = null; } - componentWillUnmount() { - document.removeEventListener('keyup', this.focusEditor); - } - editorWillMount = monaco => { defineMonacoThemes(monaco); }; @@ -96,7 +92,6 @@ class Editor extends Component { editorDidMount = (editor, monaco) => { this._editor = editor; this._editor.focus(); - document.addEventListener('keyup', this.focusEditor); this._editor.addAction({ id: 'execute-challenge', label: 'Run tests', @@ -108,13 +103,6 @@ class Editor extends Component { }); }; - focusEditor = e => { - // e key to focus editor - if (e.keyCode === 69) { - this._editor.focus(); - } - }; - onChange = editorValue => { const { updateFile, fileKey } = this.props; updateFile({ key: fileKey, editorValue });