aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Brooks <james@jamesbrooks.net>2018-08-28 12:42:30 -0700
committerRafael França <rafaelmfranca@gmail.com>2018-08-28 14:42:30 -0500
commit538f42900f8c51a0fa1ad3a3f2e4be553b247994 (patch)
tree2a92f58548acb84510d44a20af6b60ce3f434a13
parent4f09cff52c0ef771baac5f25c7c87a65068c0729 (diff)
downloadrails-538f42900f8c51a0fa1ad3a3f2e4be553b247994.tar.gz
rails-538f42900f8c51a0fa1ad3a3f2e4be553b247994.tar.bz2
rails-538f42900f8c51a0fa1ad3a3f2e4be553b247994.zip
Focus search input after page load on /rails/info/routes (#33683)
-rw-r--r--actionpack/lib/action_dispatch/middleware/templates/routes/_table.html.erb3
1 files changed, 3 insertions, 0 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/templates/routes/_table.html.erb b/actionpack/lib/action_dispatch/middleware/templates/routes/_table.html.erb
index 1fa0691303..0242b706b2 100644
--- a/actionpack/lib/action_dispatch/middleware/templates/routes/_table.html.erb
+++ b/actionpack/lib/action_dispatch/middleware/templates/routes/_table.html.erb
@@ -197,4 +197,7 @@
setupMatchPaths();
setupRouteToggleHelperLinks();
+
+ // Focus the search input after page has loaded
+ document.getElementById('search').focus();
</script>