|
|
@ -695,15 +695,13 @@ class RawEditorState extends EditorState |
|
|
|
|
|
|
|
|
|
|
|
void _updateOrDisposeSelectionOverlayIfNeeded() { |
|
|
|
void _updateOrDisposeSelectionOverlayIfNeeded() { |
|
|
|
if (_selectionOverlay != null) { |
|
|
|
if (_selectionOverlay != null) { |
|
|
|
if (_hasFocus && !textEditingValue.selection.isCollapsed) { |
|
|
|
if (!_hasFocus) { |
|
|
|
_selectionOverlay!.update(textEditingValue); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
_selectionOverlay!.dispose(); |
|
|
|
_selectionOverlay!.dispose(); |
|
|
|
_selectionOverlay = null; |
|
|
|
_selectionOverlay = null; |
|
|
|
|
|
|
|
} else if (!textEditingValue.selection.isCollapsed) { |
|
|
|
|
|
|
|
_selectionOverlay!.update(textEditingValue); |
|
|
|
} |
|
|
|
} |
|
|
|
} else if (_hasFocus) { |
|
|
|
} else if (_hasFocus) { |
|
|
|
_selectionOverlay?.hide(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_selectionOverlay = EditorTextSelectionOverlay( |
|
|
|
_selectionOverlay = EditorTextSelectionOverlay( |
|
|
|
value: textEditingValue, |
|
|
|
value: textEditingValue, |
|
|
|
context: context, |
|
|
|
context: context, |
|
|
|