diff --git a/src/components/shared/SourceView-codemirror.ts b/src/components/shared/SourceView-codemirror.ts index 65f8c5dab9..ae88c8d4ff 100644 --- a/src/components/shared/SourceView-codemirror.ts +++ b/src/components/shared/SourceView-codemirror.ts @@ -86,7 +86,7 @@ function _languageExtForPath(path: string | null): LanguageSupport | [] { // Adjustments to make a CodeMirror editor work as a non-editable code viewer. const codeViewerExtension = [ - // Make the editor non-editable. + EditorState.readOnly.of(true), EditorView.editable.of(false), // Allow tabbing to the view (to an element *inside* the scroller so that the // up / down keys trigger scrolling), and take focus on mousedown. diff --git a/src/test/components/__snapshots__/BottomBox.test.tsx.snap b/src/test/components/__snapshots__/BottomBox.test.tsx.snap index a4bc6089ff..d48ed6cf9b 100644 --- a/src/test/components/__snapshots__/BottomBox.test.tsx.snap +++ b/src/test/components/__snapshots__/BottomBox.test.tsx.snap @@ -65,6 +65,7 @@ exports[`BottomBox should show the assembly view when pressing the toggle button exports[`BottomBox should show the source view when a line in the tree view is double-clicked 1`] = `