HomePhabricator

Don't select {F...} text after adding it to textareas

Tags
None
Referenced Files
None
Subscribers
None
Tokens
"Love" token, awarded by nateguchi2.

Description

Don't select {F...} text after adding it to textareas

Summary:
Fixes T10039. We add text to textareas in two cases:

  • Users clicking assitance buttons in Remarkup text areas.
  • Drag-and-drop file uploads.

In case (1), it makes sense to highlight the text (it shows the user what we inserted, and lets them undo the action easily if it isn't what they wanted).

In case (2), it does not. Users almost never want to delete or edit a file reference. It is slightly nice to have the reference as a visual callout, but I don't think this is a big deal.

Change the behavior so that we highlight only for remarkup buttons, not for drag-and-drop files.

Test Plan:

  • Clicked an "isnert quote" button on remarkup assist area, got highlighted example text.
  • Dragged and dropped a file, got text inserted with no highlight.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10039

Differential Revision: https://secure.phabricator.com/D14851