Make WordPress Core

Opened 7 years ago

Last modified 6 years ago

#42193 new enhancement

Select text in readonly textarea on focus

Reported by: nomnom99's profile NomNom99 Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 4.9
Component: Options, Meta APIs Keywords: has-patch has-ux-feedback has-screenshots
Focuses: ui, administration Cc:

Description

https://ibin.co/3dVwFgRPo6d1.png

It would be better if the text is selected when the user clicks (focus) on a read-only textarea, especially when it's meant to be copied, for example in the Network Setup section, a user has to copy-paste in the wp-config.php or the .htaccess file.

Attachments (3)

42193.patch (978 bytes) - added by NomNom99 7 years ago.
Adds feature for selecting entire textarea text on focus
42193.1.patch (1.1 KB) - added by NomNom99 7 years ago.
Adds feature for selecting entire textarea text by Button
42193.2.patch (1.1 KB) - added by NomNom99 7 years ago.
Replaced siblings() with prev()

Download all attachments as: .zip

Change History (9)

@NomNom99
7 years ago

Adds feature for selecting entire textarea text on focus

#1 @swissspidy
7 years ago

  • Component changed from Administration to Networks and Sites
  • Focuses accessibility javascript removed
  • Keywords has-patch ux-feedback added

When you just want to select a specific part of the textarea's content, 42193.patch does not work great.

Another option would be to add a copy button. Just click on it to put the content into the clipboard.

The regular permalinks setup could benefit from such a change as well.

#2 @NomNom99
7 years ago

@swissspidy That makes sense. I'll add a button instead.

@NomNom99
7 years ago

Adds feature for selecting entire textarea text by Button

@NomNom99
7 years ago

Replaced siblings() with prev()

#3 @NomNom99
7 years ago

Render after patch.
https://ibin.co/3ek8ZylmCPd8.png

#4 @swissspidy
7 years ago

  • Component changed from Networks and Sites to Options, Meta APIs
  • Focuses ui added
  • Keywords has-screenshots added
  • Milestone changed from Awaiting Review to Future Release

This ticket was mentioned in Slack in #design by boemedia. View the logs.


6 years ago

#6 @joyously
6 years ago

  • Keywords has-ux-feedback added; ux-feedback removed

Looks good for UX.

Note: See TracTickets for help on using tickets.