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. 🐞

  • Gollum@feddit.orgOP
    link
    fedilink
    arrow-up
    1
    ·
    7 days ago

    I swear I saw it happening with regular text but now it is only the case for emojis 😅

    • CreatureSurvive@lemmy.worldM
      link
      fedilink
      arrow-up
      2
      ·
      3 days ago

      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.

        • CreatureSurvive@lemmy.worldM
          link
          fedilink
          arrow-up
          2
          ·
          3 days ago

          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.

    • CreatureSurvive@lemmy.worldM
      link
      fedilink
      arrow-up
      2
      arrow-down
      1
      ·
      7 days 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.