Autocomplete menu closes when typing characters without accents for accented label or filterText
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- react, typescript
- Lĩnh vực
- developer-experience, frontend
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện trường hợp hoàn thành không phân biệt dấu được mô tả trong issue, sau đó truy vết cách validFor và filterText được đánh giá khi tiền tố đã nhập thay đổi. Kiểm tra xem hành vi này thuộc về React wrapper này hay phần xử lý hoàn thành bên dưới của CodeMirror. Được xem là hoàn tất khi menu vẫn mở với epossivel và vẫn khớp với filterText được cung cấp.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I'm using a custom completion source with filterText and label, and I want to support matches that are case-insensitive and accent-insensitive. For example, I have the following completion:
{
label: '{ePossível}',
filterText: 'epossivel',
displayLabel: 'ePossível',
type: 'string'
}
When I type:
- epossível → ✅ matches
- epossvel → ✅ matches
- epossivel → ❌ the autocomplete menu disappears after typing the i
This happens even though filterText is set correctly. I suspect the issue lies in how validFor is used internally.
The completion menu should remain open as long as the text typed by the user matches the filterText or label, even if accent marks are missing or characters differ slightly (e.g. e vs é). In my case, epossivel should continue to match {ePossível} through filterText.
What I tried
- I removed
validFor→ autocomplete doesn't appear at all. - I used
validFor: /[\p{L}\p{N}_]+/u→ still closes after typingiinepossivel. - I tried using a
validForfunction that normalizes both userinputandfilterText, but it seems the menu still disappears prematurely.
This issue only happens when trying to autocomplete accented labels from non-accented user input, which should match via filterText. It seems the internal logic closes the autocomplete menu when the input no longer matches the regex, even if the options still include a match after normalization.
Is there a recommended way to support accent-insensitive autocompletion?
- Ngôn ngữ chính
- TypeScript
- Star
- 2.3k
- Fork
- 162
- Merge trung bình
- 2 giờ 41 phút
- Pull request đã merge (30 ngày)
- 1
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của uiwjs/react-codemirror
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
uiwjs/react-codemirror#766 · 2 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
uiwjs/react-codemirror#765 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
uiwjs/react-codemirror#772 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
uiwjs/react-codemirror#770 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
uiwjs/react-codemirror#767 · 2 bình luận ·
Tất cả issue của uiwjs/react-codemirror
Issue tương tự
-
批量图谱关联的备份应排除Obsidian索引Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
logancyang/obsidian-copilot#3753 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: presentation severity: important
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
voithos-labs/aragonite#763 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
fix(cursor): align Grok 4.7 context window to 256k/500k and drop unsupported max effort tierĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
diegosouzapw/OmniRoute#17386 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
💡 [Feature] Add an option to hide the empty screen background illustration (Distraction-Free)Đang mở
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 72/100
super-productivity/super-productivity#10982 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày