Last Comment Bug 606858 - Clicking the search button no longer focuses content
: Clicking the search button no longer focuses content
Status: RESOLVED FIXED
: regression
Product: SeaMonkey
Classification: Client Software
Component: Search (show other bugs)
: Trunk
: All All
: -- minor (vote)
: seamonkey2.1b2
Assigned To: Krang
:
Mentors:
Depends on:
Blocks: 410613
  Show dependency treegraph
 
Reported: 2010-10-24 16:15 PDT by Krang
Modified: 2010-10-31 02:39 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Add focus to content (1.06 KB, patch)
2010-10-24 16:15 PDT, Krang
no flags Details | Diff | Review
Add focus to content v1.1 (1.02 KB, patch)
2010-10-24 22:15 PDT, Krang
neil: review+
neil: superreview+
Details | Diff | Review
Add focus for Search the Web (681 bytes, patch)
2010-10-25 16:49 PDT, Krang
neil: review+
neil: superreview+
Details | Diff | Review

Description Krang 2010-10-24 16:15:53 PDT
Created attachment 485639 [details] [diff] [review]
Add focus to content

After the patch in bug 410613 was checked in, opening a new tab and clicking the search button on the navigation toolbar no longer gives focus to the content, instead leaving it on the urlbar.  Here is a patch that corrects that.  When looking through the code, I also noticed that our version of loadURI() has different parameters than the one in Firefox, so I also switched it to call gBrowser.loadURIWithFlags() directly.
Comment 1 neil@parkwaycc.co.uk 2010-10-24 16:31:54 PDT
(From update of attachment 485639 [details] [diff] [review])
Why the try/catch?
Comment 2 Krang 2010-10-24 16:39:37 PDT
The function definition starting on line 1488 had it, so I copied it over just to be safe.  If it's not needed, though, I can remove it in the next patch.
Comment 3 Philip Chee 2010-10-24 20:37:24 PDT
<!-- throws exception for unknown schemes -->
http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/toolkit/content/widgets/browser.xml&rev=1.118&mark=165#165

1.1 <hewitt@netscape.com> 2002-09-27 23:21
165955 - turning on satchel in phoenix
Comment 4 Krang 2010-10-24 22:15:17 PDT
Created attachment 485662 [details] [diff] [review]
Add focus to content v1.1

Thanks for pointing that out.  It looks like the scheme for the search plugin is already checked in nsSearchService.js, so the try/catch here is unnecessary.  Here is an updated patch.
Comment 5 neil@parkwaycc.co.uk 2010-10-25 03:09:02 PDT
Comment on attachment 485662 [details] [diff] [review]
Add focus to content v1.1

This is great, but I just noticed that Tools/Search the Web has the same bug, any chance you can fix that version too?
Comment 6 Krang 2010-10-25 16:49:05 PDT
Created attachment 485913 [details] [diff] [review]
Add focus for Search the Web

No problem, here is the patch.

Note You need to log in before you can comment on or make changes to this bug.