Opened 10 years ago
Closed 10 years ago
#32055 closed defect (bug) (fixed)
Filesystem Credentials Request Modal: Inline JavaScript focuses every first input of a form
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.2 | Priority: | normal |
Severity: | normal | Version: | 4.2 |
Component: | Filesystem API | Keywords: | has-patch commit |
Focuses: | ui | Cc: |
Description
Originally reported by sergej.mueller:
When wp_print_request_filesystem_credentials_modal()
is called and credentials are required request_filesystem_credentials()
is printed. That includes some inline JavaScript:
<script type="text/javascript"> <!-- jQuery(function($){ jQuery("#ssh").click(function () { jQuery("#ssh_keys").show(); }); jQuery("#ftp, #ftps").click(function () { jQuery("#ssh_keys").hide(); }); jQuery('form input[value=""]:first').focus(); }); --> </script>
The last line will focus every first input of a form. On wp-admin/plugins.php this will be the search input.
Attachments (2)
Change History (7)
This ticket was mentioned in Slack in #core by drew. View the logs.
10 years ago
#3
@
10 years ago
Tested 32055.1.diff on wp-admin/plugins.php and wp-admin/network/plugins.php and the search field is no longer focused. On the FS credentials modal, the first field is still focused on launch as expected.
@ocean90: are there any other screens we should be testing?
Note: See
TracTickets for help on using
tickets.
We could target the form pretty easily and fix this. Uploaded a quick patch.