Merge lp:~huwshimi/launchpad/bug-link-focus-749845 into lp:launchpad

Proposed by Huw Wilkins
Status: Merged
Approved by: Huw Wilkins
Approved revision: no longer in the source branch.
Merged at revision: 13342
Proposed branch: lp:~huwshimi/launchpad/bug-link-focus-749845
Merge into: lp:launchpad
Diff against target: 10 lines (+1/-0)
1 file modified
lib/lp/code/javascript/branch.bugspeclinks.js (+1/-0)
To merge this branch: bzr merge lp:~huwshimi/launchpad/bug-link-focus-749845
Reviewer Review Type Date Requested Status
Deryck Hodge (community) code Approve
Review via email: mp+66474@code.launchpad.net

Commit message

[r=deryck][bug=749845] Link to a bug report form input now has focus when form is opened

Description of the change

The "Link to a bug" form on a branch summary page should set focus on the input when it opens. This branch makes that happen.

To post a comment you must log in.
Revision history for this message
Deryck Hodge (deryck) wrote :

This code looks fine. Here's the pastebin from our discussion in real life:

http://pastebin.ubuntu.com/635875/

We should definitely fix this for all form elements in FormOverlay as we said, but no harm landing this ASAP to fix the bug. Don't forget to take this out when you fix FormOverlay.

Cheers,
deryck

review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/code/javascript/branch.bugspeclinks.js'
2--- lib/lp/code/javascript/branch.bugspeclinks.js 2011-02-24 00:23:04 +0000
3+++ lib/lp/code/javascript/branch.bugspeclinks.js 2011-06-30 15:26:38 +0000
4@@ -50,6 +50,7 @@
5 linkbug_handle.on('click', function(e) {
6 e.preventDefault();
7 link_bug_overlay.show();
8+ Y.DOM.byId('field.bug').focus();
9 });
10 connect_remove_links();
11