[GH-ISSUE #8579] [Bug] “@” or “+” not support chinese search #3923

Open
opened 2026-03-23 21:34:10 +00:00 by mirror · 1 comment
Owner

Originally created by @braid-cyber on GitHub (Mar 15, 2026).
Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/8579

Bug Description

“@” or “+” not support chinese search

How to Reproduce

“@” or “+” then input chinese

Expected Behavior

support chinese search

Operating System

windows

AppFlowy Version(s)

0.11.3

Screenshots

No response

Additional Context

No response

Originally created by @braid-cyber on GitHub (Mar 15, 2026). Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/8579 ### Bug Description “@” or “+” not support chinese search ### How to Reproduce “@” or “+” then input chinese ### Expected Behavior support chinese search ### Operating System windows ### AppFlowy Version(s) 0.11.3 ### Screenshots _No response_ ### Additional Context _No response_
Author
Owner

@braid-cyber commented on GitHub (Mar 19, 2026):

inline_actions_handler.dart

@override
void initState() {
  super.initState();
  WidgetsBinding.instance.addPostFrameCallback(
    (_) => _focusNode.requestFocus(),
  );

  startOffset = widget.editorState.selection?.endIndex ?? 0;
  widget.editorState.selectionNotifier.addListener(_onSelectionChanged);
}

@override
void dispose() {
  widget.editorState.selectionNotifier.removeListener(_onSelectionChanged);
  _scrollController.dispose();
  _focusNode.dispose();
  super.dispose();
}

void _onSelectionChanged() {
  final selection = widget.editorState.selection;
  if (selection == null || !selection.isCollapsed) return;
  final path = selection.end.path;
  final node = widget.editorState.getNodeAtPath(path);
  final text = node?.delta?.toPlainText() ?? "";
  if (text.isEmpty) return;

  if (selection.endIndex < startOffset - widget.startCharAmount) {
    widget.onDismiss();
    return;
  }
  final currentSearch = text.substring(
    startOffset,
    selection.endIndex,
  );

  if (currentSearch != _search) {
    setState(() {
      search = currentSearch;
    });
  }
}

"@" or "+" support multi-language search

<!-- gh-comment-id:4087127642 --> @braid-cyber commented on GitHub (Mar 19, 2026): inline_actions_handler.dart ``` @override void initState() { super.initState(); WidgetsBinding.instance.addPostFrameCallback( (_) => _focusNode.requestFocus(), ); startOffset = widget.editorState.selection?.endIndex ?? 0; widget.editorState.selectionNotifier.addListener(_onSelectionChanged); } @override void dispose() { widget.editorState.selectionNotifier.removeListener(_onSelectionChanged); _scrollController.dispose(); _focusNode.dispose(); super.dispose(); } void _onSelectionChanged() { final selection = widget.editorState.selection; if (selection == null || !selection.isCollapsed) return; final path = selection.end.path; final node = widget.editorState.getNodeAtPath(path); final text = node?.delta?.toPlainText() ?? ""; if (text.isEmpty) return; if (selection.endIndex < startOffset - widget.startCharAmount) { widget.onDismiss(); return; } final currentSearch = text.substring( startOffset, selection.endIndex, ); if (currentSearch != _search) { setState(() { search = currentSearch; }); } } ``` "@" or "+" support multi-language search
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AppFlowy-IO/AppFlowy#3923
No description provided.