diff --git a/lib/src/editor/editor_component/service/selection/mobile_selection_service.dart b/lib/src/editor/editor_component/service/selection/mobile_selection_service.dart index 167c822d5..d7e6b19a2 100644 --- a/lib/src/editor/editor_component/service/selection/mobile_selection_service.dart +++ b/lib/src/editor/editor_component/service/selection/mobile_selection_service.dart @@ -305,7 +305,11 @@ class _MobileSelectionServiceWidgetState shiftWithBaseOffset: true, ); - if (node == null || rects == null || rects.isEmpty) { + if (node == null || + rects == null || + rects.isEmpty || + editorState.selectionUpdateReason == + SelectionUpdateReason.searchHighlight) { return const SizedBox.shrink(); } diff --git a/lib/src/editor/find_replace_menu/search_service_v3.dart b/lib/src/editor/find_replace_menu/search_service_v3.dart index 8ea1de83a..a5abc4a66 100644 --- a/lib/src/editor/find_replace_menu/search_service_v3.dart +++ b/lib/src/editor/find_replace_menu/search_service_v3.dart @@ -113,19 +113,10 @@ class SearchServiceV3 { ); if (matchWrappers.value.isEmpty || unHighlight) { - editorState.updateSelectionWithReason( - null, - reason: SelectionUpdateReason.searchHighlight, - extraInfo: { - selectionExtraInfoDoNotAttachTextService: true, - }, - ); - } else { - selectedIndex = selectedIndex; - _highlightCurrentMatch( - pattern, - ); + return; } + selectedIndex = selectedIndex; + _highlightCurrentMatch(pattern); } List _getMatchWrappers({ @@ -160,17 +151,6 @@ class SearchServiceV3 { if (jumpInterceptor?.call(path) == false) { editorState.scrollService?.jumpTo(path.first); } - - editorState.updateSelectionWithReason( - selection, - reason: SelectionUpdateReason.searchHighlight, - extraInfo: { - selectionExtraInfoDisableToolbar: true, - selectionExtraInfoDoNotAttachTextService: true, - selectionExtraInfoDisableMobileToolbarKey: true, - selectionExtraInfoSelectionRadius: 6.0, - }, - ); } /// This method takes in a boolean parameter moveUp, if set to true,