From 457dbe13be6a9afddd23945c381499cc9aeb1152 Mon Sep 17 00:00:00 2001 From: Oliver Eyton-Williams Date: Mon, 30 Mar 2020 17:34:43 +0200 Subject: [PATCH] fix: use updated monaco api --- client/src/templates/Challenges/classic/Editor.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/src/templates/Challenges/classic/Editor.js b/client/src/templates/Challenges/classic/Editor.js index b48e32c6bb..c4d7509c82 100644 --- a/client/src/templates/Challenges/classic/Editor.js +++ b/client/src/templates/Challenges/classic/Editor.js @@ -180,10 +180,10 @@ class Editor extends Component { this.props.setEditorFocusability(true) ); // This is to persist changes caused by the accessibility tooltip. - // Unfortunately it relies on Monaco's implementation details - this._editor.onDidChangeConfiguration(() => { + this._editor.onDidChangeConfiguration(event => { if ( - this._editor.getConfiguration().accessibilitySupport === 2 && + event.hasChanged(monaco.editor.EditorOption.accessibilitySupport) && + editor.getRawOptions().accessibilitySupport === 'on' && !this.props.inAccessibilityMode ) { this.props.setAccessibilityMode(true);