this post was submitted on 13 Feb 2025
3 points (80.0% liked)

Arctic

470 readers
14 users here now

Arctic is a Lemmy client for iOS built on pure Swift. It currently supports iOS 15+ and Lemmy v0.17+

Get the latest version on TestFlight, or check it out on the AppStore.

If you would like to support Arctic’s development, feel free to Buy Me A Coffee

founded 2 years ago
MODERATORS
 

When you put the cursor somewhere in the middle of the title and type something, it will jump to the end of the text after each character or emoji. I guess that's a bug. 🐞

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 1 points 1 week ago (2 children)

I swear I saw it happening with regular text but now it is only the case for emojis πŸ˜…

[–] CreatureSurvive 2 points 5 days ago (1 children)

Indeed it does happen for regular text as well. Basically, if the title contained an emoji, the cursor would jump to the end after every change.

This was caused by stripping line breaks from the title field. I was able to fix this simply by updating the regex.

[–] [email protected] 1 points 5 days ago (1 children)

Show us the regex and let us break it again. 🀑

Thx πŸ™

[–] CreatureSurvive 2 points 5 days ago (1 children)

The regex update did not work, I broke it myself. For some reason, just the presence of an emoji cases the cursor to jump, even when the text is not changed by the regex. Instead, I ended up storing and restoring the cursor position during the check.

I'm not sure why it behaves this way, but the fix seems to work just fine, so I'll just leave it alone.

[–] [email protected] 1 points 5 days ago

Classic regex behaviour

[–] CreatureSurvive 1 points 1 week ago

If it is happening for regular text, I would assume it is caused by the same issue, so fixing one should fix the other. hopefully.