diff --git a/lib/src/widgets/raw_editor.dart b/lib/src/widgets/raw_editor.dart index 87a938bc..5c68111b 100644 --- a/lib/src/widgets/raw_editor.dart +++ b/lib/src/widgets/raw_editor.dart @@ -757,6 +757,9 @@ class RawEditorState extends EditorState controller.document.queryChild(controller.selection.baseOffset); KeyEventResult insertTabCharacter() { + if (widget.readOnly) { + return KeyEventResult.ignored; + } controller.replaceText(controller.selection.baseOffset, 0, '\t', null); _moveCursor(1); return KeyEventResult.handled;