Merge lp:~jcsackett/launchpad/autofocus-2-135018 into lp:launchpad

Proposed by j.c.sackett
Status: Merged
Approved by: j.c.sackett
Approved revision: no longer in the source branch.
Merged at revision: 12139
Proposed branch: lp:~jcsackett/launchpad/autofocus-2-135018
Merge into: lp:launchpad
Diff against target: 12 lines (+3/-0)
1 file modified
lib/lp/registry/templates/products-index.pt (+3/-0)
To merge this branch: bzr merge lp:~jcsackett/launchpad/autofocus-2-135018
Reviewer Review Type Date Requested Status
Jelmer Vernooij (community) Approve
Review via email: mp+44472@code.launchpad.net

Commit message

[r=jelmer][ui=none][bug=135018] Adds autofocus to /projects

Description of the change

Summary
=======

The projects page does not autofocus on the search field, and should. This adds autofocus to the search form.

Preimplemenation Talk
=====================

Spoke with Curtis Hovey about how to set auto focus.

Implementation
==============

lib/lp/registry/templates/products-index.pt
---------------------------------------------------

Added setFocusByName to the template for the form as it has been used elsewhere. setFocusByName sets the focus to the search form.

Demo & QA
=========

Open http://launchpad.dev/projects; the search field should get focus

To post a comment you must log in.
Revision history for this message
Jelmer Vernooij (jelmer) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/registry/templates/products-index.pt'
2--- lib/lp/registry/templates/products-index.pt 2010-03-05 00:11:34 +0000
3+++ lib/lp/registry/templates/products-index.pt 2010-12-22 15:35:26 +0000
4@@ -52,6 +52,9 @@
5 value="Search projects"
6 />
7 </form>
8+ <script type="text/javascript"><!--
9+ setFocusByName('text');
10+ // --></script>
11
12 <tal:searching condition="view/search_requested">
13