Skip to content

Commit b27f3fb

Browse files
committed
Disable ACE worker for RfC comment area
Otherwise, annotations would be overwritten by an ACE worker, if available. This bug was only present for a few file types (incl. JavaScript, JSON, PHP, CoffeeScript, CSS, XQuery) as listed in the official docs [1]. If this bug was triggered and no syntax error was present in the learner's file, this would simply "remove" the comment annotations and prevent accessing existing comments written for the file. Closes #2751 [1] https://github.com/ajaxorg/ace/wiki/Syntax-validation
1 parent f1889c0 commit b27f3fb

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

app/assets/javascripts/request_for_comments.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ $(document).on('turbolinks:load', function () {
6262
commentitor.each(function (index, editor) {
6363
const currentEditor = ace.edit(editor);
6464
currentEditor.setReadOnly(true);
65+
currentEditor.getSession().setOption("useWorker", false);
6566
// set editor mode (used for syntax highlighting
6667
currentEditor.getSession().setMode($(editor).data('mode'));
6768
currentEditor.setTheme(CodeOceanEditor.THEME);

0 commit comments

Comments
 (0)