social-app icon indicating copy to clipboard operation
social-app copied to clipboard

Accidentally deleting draft post when you mention an account

Open LukeberryPi opened this issue 5 months ago • 1 comments

Describe the bug

When creating a post and mentioning an account, it is possible to blur from the text area and lose your content.

To Reproduce

  1. Click on "New Post"
  2. Mention someone (e.g.: write "@lukeberrypi.bsky.social")
  3. Place your cursor after the last character of the mention
  4. Press cmd + ←
  5. You will navigate to the previous page (same as clicking the Back button on Chrome)
  6. Your original post is now lost

Expected behavior

The expected behavior is to navigate to the beginning of the line, and preserve the post content without unintended navigation.

Screenshots

https://github.com/user-attachments/assets/c96de9c0-c637-4b2c-af87-c40d8d3c94a8

Details

  • Platform: macOS and Google Chrome
  • Platform version: Sonoma 14.3.1 (23D60) and Chrome Version 128.0.6613.113 (Official Build) (arm64)
  • App version: -

Additional context

Just for clarification, when the user is not focused on an text input element (as in

I noticed that mentions on posts are treated differently to normal text, because they can't even be selected via shift + ←, or navigated from within the mention itself. I believe these are valuable clues to locating and solving this bug.

LukeberryPi avatar Sep 03 '24 09:09 LukeberryPi