launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #02234
[Merge] lp:~jcsackett/launchpad/autofocus-2-135018 into lp:launchpad
j.c.sackett has proposed merging lp:~jcsackett/launchpad/autofocus-2-135018 into lp:launchpad.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
Related bugs:
#135018 Search field isn't auto-focused on Projects page
https://bugs.launchpad.net/bugs/135018
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
--
https://code.launchpad.net/~jcsackett/launchpad/autofocus-2-135018/+merge/44472
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~jcsackett/launchpad/autofocus-2-135018 into lp:launchpad.
=== modified file 'lib/lp/registry/templates/products-index.pt'
--- lib/lp/registry/templates/products-index.pt 2010-03-05 00:11:34 +0000
+++ lib/lp/registry/templates/products-index.pt 2010-12-22 15:35:26 +0000
@@ -52,6 +52,9 @@
value="Search projects"
/>
</form>
+ <script type="text/javascript"><!--
+ setFocusByName('text');
+ // --></script>
<tal:searching condition="view/search_requested">