From 6de68abd0654288583549586f529fb4e8cde6d0e Mon Sep 17 00:00:00 2001 From: Morn Date: Fri, 17 Apr 2026 11:20:57 +0800 Subject: [PATCH 1/2] fix: hide the drag handle for the matched text --- .../service/selection/mobile_selection_service.dart | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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(); } From 22af6ccd481cc6b732d7ae3252369a609626a622 Mon Sep 17 00:00:00 2001 From: Morn Date: Wed, 17 Jun 2026 15:32:33 +0800 Subject: [PATCH 2/2] fix: avoid update selection in search_service_v3.dart --- .../find_replace_menu/search_service_v3.dart | 26 +++---------------- 1 file changed, 3 insertions(+), 23 deletions(-) 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,