From 430bfd7c7e6f21f0731253eb1b6304e94679ab9a Mon Sep 17 00:00:00 2001 From: CatHood0 Date: Sat, 17 Aug 2024 07:14:33 -0400 Subject: [PATCH] Fix: context menu fails by null value when try to update the view --- lib/src/editor/raw_editor/raw_editor_state.dart | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/src/editor/raw_editor/raw_editor_state.dart b/lib/src/editor/raw_editor/raw_editor_state.dart index 866f0e68..fbb6b152 100644 --- a/lib/src/editor/raw_editor/raw_editor_state.dart +++ b/lib/src/editor/raw_editor/raw_editor_state.dart @@ -1422,8 +1422,7 @@ class QuillRawEditorState extends EditorState if (!_hasFocus || textEditingValue.selection.isCollapsed) { _selectionOverlay?.dispose(); _selectionOverlay = null; - } - if (_hasFocus) { + } else if (_hasFocus) { _selectionOverlay!.update(textEditingValue); } } else if (_hasFocus) {