Skip to content

Commit

Permalink
Fixed tab editing when in readOnly mode (#1433)
Browse files Browse the repository at this point in the history
  • Loading branch information
carly-goodandbeautiful authored Oct 18, 2023
1 parent 1022f2d commit 88a7f2c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/src/widgets/raw_editor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 88a7f2c

Please sign in to comment.