"find/replace" UX in edit repl breaks for non ASCII characters

Bug description:

Trying to search/replace this string:


in a text file of many strings



has a very odd (bad) behavior which seems like a bug.

If you copy/paste “SanJoséState” into the replace field, and you then place the cursor after the “é” character and backspace/replace with “e”, the cursor (insert point) jumps to the end of the text in the “replace with field” and adds the “e” at the end, rather than at the insert point.

Expected vs Current Behavior:
The edit in this field should insert the typed character at the location where the cursor is in the edit field, rather than jumping to the end.

Steps to reproduce:
select the find/replace feature.

Enter the string above
try to replace the “é” with “e”
See cursor jump to end

Bug appears at this link: https://replit.com/@cstutormarin/cs220-HW06-College-Football-Matchups-Soln#teamsIds.txt

Screenshot(s)/Screen Recording:

Browser/OS/Device: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36

Replit Profile: https://replit.com/@cstutormarin

1 Like

I will add some clarification, this happens for all characters. (you should update this topic)
If you use a word without non ASCII characters, it has the same bug.

Go to a file in editor and do a file search (ctrl+f),
put a word in either of the find or replace boxes,
when you edit the word in any way, the cursor is reset back to end of word (only visible when you edit middle of word).