bluesky-social / social-app

The Bluesky Social application for Web, iOS, and Android
https://bsky.app
MIT License
8.16k stars 1.08k forks source link

Accidentally deleting draft post when you mention an account #5105

Open LukeberryPi opened 2 weeks ago

LukeberryPi commented 2 weeks ago

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

Additional context

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