diff --git a/lib/src/widgets/raw_editor/raw_editor_state.dart b/lib/src/widgets/raw_editor/raw_editor_state.dart index 670cd8ee..f4a7d6f7 100644 --- a/lib/src/widgets/raw_editor/raw_editor_state.dart +++ b/lib/src/widgets/raw_editor/raw_editor_state.dart @@ -1452,12 +1452,12 @@ class QuillRawEditorState extends EditorState } void _handleFocusChanged() { + openOrCloseConnection(); if (dirty) { SchedulerBinding.instance .addPostFrameCallback((_) => _handleFocusChanged()); return; } - openOrCloseConnection(); _cursorCont.startOrStopCursorTimerIfNeeded(_hasFocus, controller.selection); _updateOrDisposeSelectionOverlayIfNeeded(); if (_hasFocus) {