Closed Bug 337147 Opened 20 years ago Closed 20 years ago

Clicking on the favicon should focus the search box

Categories

(Firefox :: Search, defect)

2.0 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 2 beta1

People

(Reporter: bugs, Assigned: pamg.bugs)

References

Details

(Keywords: fixed1.8.1)

Attachments

(1 file, 2 obsolete files)

Steps to reproduce: 1. click on the favicon in the search box Actual results: Nothing happens Expected results: Text field focused for input
This works for me with the latest 1.8 branch build on windows.
Blocks: 335435
Depends on: 337292
This fixes the problem on other platforms, but I can't figure out how to make the hover border not show up on the search-engine icon button in Windows. Work In Progress pending that polish.
Attachment #222087 - Attachment is obsolete: true
Attachment #222095 - Flags: review?(joe)
Mostly looks good--why does the patch remove the inheritance of "src" from the go button?
Comment on attachment 222095 [details] [diff] [review] Simpler solution for all platforms >Index: components/search/content/search.xml > <handlers> >+ <handler event="click"><![CDATA[ >+ const target = event.originalTarget; >+ var anonid = target.getAttribute("anonid"); >+ if (anonid == "searchbar-engine-image") { >+ this._textbox.focus(); >+ this._textbox.select(); The "._textbox" part is unnecessary here (see http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/browser/components/search/content/search.xml&rev=1.56#165 )
(In reply to comment #4) > Mostly looks good--why does the patch remove the inheritance of "src" from the > go button? It was left over from when the go button was also the engine icon. Since the go button doesn't change icons anymore, it's no longer needed and potentially confusing. (In reply to comment #5) > The "._textbox" part is unnecessary here I saw that, but to me it's clearer to call the method on the object that's being focused, since it's readily available in that handler. Is there a benefit to calling it on the searchbar instead?
(In reply to comment #6) > I saw that, but to me it's clearer to call the method on the object that's > being focused, since it's readily available in that handler. Is there a > benefit to calling it on the searchbar instead? Probably not... I was thinking that one of those methods may be extended to do additional things in the future, but I guess that's not very likely.
Target Milestone: --- → Firefox 2 beta1
Attachment #222095 - Flags: review?(joe) → review+
Attachment #222095 - Flags: superreview?(bryner)
Attachment #222095 - Flags: superreview?(bryner) → superreview+
Whiteboard: [checkin needed]
(Randomly cruising the bmo database) When (and why) did this change from how it works in 1.5 (clicking on the favicon opens the engine chooser menu and moves focus to the box as well)? In the 1.5 searchbar you can click the icon, choose your engine (or press escape), and immeadiatly begin typing (any previous text is selected and replaced as soon as you type).
Bug 335441 added a Search button to the right of the searchbox, analogous to the Go button for the location box, and moved the engine selection from the icon to the new Search button so more people can discover that it exists. In the 2.0a searchbar you can click the Search button's drop-down arrow, choose your engine, and immediately begin typing (any previous text is selected and replaced as soon as you type). Or if you want to use the engine already selected, you can either click on the engine icon, which also selects all the text in the field, or you can click in the textbox and replace the existing text in the usual way (drag over it, use the Select All command, use the Web Search command, etc.).
Attached patch Unbitrotted — — Splinter Review
Attachment #222095 - Attachment is obsolete: true
mozilla/browser/components/search/content/search.xml 1.61
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Whiteboard: [checkin needed] → [checkin needed (1.8 branch)]
Version: Trunk → 2.0 Branch
mozilla/browser/components/search/content/search.xml 1.37.2.28
Keywords: fixed1.8.1
Whiteboard: [checkin needed (1.8 branch)]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: