Opened 12 years ago
Closed 12 years ago
#21656 closed enhancement (fixed)
Focusing on code textareas during setup should select all
Reported by: | jblz | Owned by: | nacin |
---|---|---|---|
Milestone: | 3.5 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Upgrade/Install | Keywords: | has-patch needs-testing |
Focuses: | Cc: |
Description
Automatically selecting all text in the textarea.code elements on focus reduces the number of steps required to copy the settings to a file and reduces the likelihood of a new user only copying the visible portion at the top.
Attachments (2)
Change History (7)
Note: See
TracTickets for help on using
tickets.
Automatically selecting on focus/enter/click can be confusing to users, and also buggy — certain keyboard or mouse events might act in strange ways, which pose problems for both accessibility and for keystrokes done by power users. I broke this a few times, though I may have been doing it wrong.
On network.php, we deliberately show all lines, with no scroll. I do want to adjust setup-config.php, as with scrollbars often being hidden in newer browsers and operating systems, it's definitely possible to only grab the visible portion.
I came up with calling .focus() and .select() on the textarea, and it worked well for me. What do you think?