Opened 14 years ago
Closed 14 years ago
#21656 closed enhancement (fixed)
Focusing on code textareas during setup should select all
| Reported by: | jblz | Owned by: | nacin |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.5 |
| Component: | Upgrade/Install | Version: | |
| Severity: | normal | Keywords: | has-patch needs-testing |
| Cc: | Focuses: |
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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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?