Closed Bug 416937 Opened 16 years ago Closed 16 years ago

After clicking site button and clicking elsewhere focus goes to address bar

Categories

(Firefox :: Address Bar, defect)

defect
Not set
minor

Tracking

()

VERIFIED FIXED
Firefox 3.6a1

People

(Reporter: chadwickgab+mozilla, Assigned: dao)

References

Details

(Keywords: polish, regression, verified1.9.1, Whiteboard: [polish-easy] [polish-interactive][polish-p1])

Attachments

(1 file, 1 obsolete file)

The focus after dismissing site button stays on address bar and selects address when it should not select the address. This behaviour can lead to unwanted editing of addresses. Confusing to me.

Steps to reproduce :

1. Click on site button.
2. Click elsewhere in Firefox window. (Not on identity popup or address bar).

Actual behaviour :

Address in address bar is selected.

Expected behaviour :

Dismiss identity popup only. To not select the address.
Flags: blocking-firefox3?
Keywords: polish, qawanted
This doesn't happen on 3.0b2.  What version are you reporting for?
Let me edit that, this doesn't happen for me on Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b2) Gecko/2007121120 Firefox/3.0b2
Using trunk nightly Mozilla/5.0 (Windows; U; Windows NT 6.0; fr; rv:1.9b4pre) Gecko/2008021104 Minefield/3.0b4pre ID:2008021104. Would be a regression then. If someone is interested I can find a regression range.
Keywords: regression
It doesn't bother me, although it is too laborious to use this as a new way to select the locationbar. It regressed somewhere in the last two weeks of Jan 2008.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Although it takes two clicks, it is a good way to select the locationbar because it selects on mousedown. In fact is is a fix of Bug 403981. 
(In reply to comment #5)
> Although it takes two clicks, it is a good way to select the locationbar
> because it selects on mousedown. In fact is is a fix of Bug 403981. 
> 

I don't think that clicking on the search field after clicking on the site button is a good way to select address bar. It should select the clicked item. Or at least only dismiss the popup and not select the address bar. Very confusing.

It does look like it fixes Bug 403981. But I think we should have a more coherent behaviour here.
In fact clicking on anything outside Larry (titlebar, chrome, page) selects the locationbar. It's just the opposite behaviour. It may cause problems on sites with an input field like www.google.com. Former behaviour was to keep the cursor in the input- or text field after clicking on Larry.

It's also causing selection problems and wrong context-menus, at least using my default profile. 
Blocks: 403981
This was caused by an intentional change to Larry's onpopuphiding handler from bug 407359.
Not going to block on this, but I agree that if the user clicks somewhere other than the location bar or the site identity button, we should be putting focus in that other place.

Johnath, are you the right person to take this?
Flags: wanted-firefox3+
Flags: blocking-firefox3?
Flags: blocking-firefox3-
Since the identity button is a very important feature in Firefox 3 I really think some energy should be put towards fixing this bug. People that will use the button will find this behaviour very annoying. In other minor bug the address bar was considered as an important area for polish and this issue definitely needs some love. I would volunteer for testing if needed.
Bug 407359 comment 59 is wrong or doesn't apply anymore. Shift+Tab focuses the identity button, clicking doesn't.
Assignee: nobody → dao
No longer blocks: 403981
Keywords: qawanted
Attached patch patch (obsolete) — Splinter Review
We should also remove support for norestorefocus. It's only used in a test, which is probably bogus.
Attachment #332202 - Flags: review?(gavin.sharp)
Blocks: 449040
Blocks: 403981
Flags: wanted-firefox3.1?
Flags: blocking-firefox3.1?
Depends on: 450554
Attached patch patchSplinter Review
without the popup.xml changes
Attachment #332202 - Attachment is obsolete: true
Attachment #334888 - Flags: review?(gavin.sharp)
Attachment #332202 - Flags: review?(gavin.sharp)
No longer depends on: 450554
(In reply to comment #11)
> Bug 407359 comment 59 is wrong or doesn't apply anymore. Shift+Tab focuses the
> identity button, clicking doesn't.

As far as I can tell it's still true, at least on Mac and Linux. With this patch applied, if I focus the location bar, and then click the button, and dismiss the popup (either by pressing Esc or clicking the URL bar again), the focus stays on the button and I have to Tab to the location bar. It also keeps focus if I dismiss the popup by clicking on a text field in content (though that's no different than what we currently do apart from where focus ends up).
(In reply to comment #14)
> (In reply to comment #11)
> > Bug 407359 comment 59 is wrong or doesn't apply anymore. Shift+Tab focuses the
> > identity button, clicking doesn't.
> 
> As far as I can tell it's still true, at least on Mac and Linux. With this
> patch applied, if I focus the location bar, and then click the button, and
> dismiss the popup (either by pressing Esc or clicking the URL bar again), the
> focus stays on the button and I have to Tab to the location bar.

Bug 407359 comment 59 refers to the patch that made the identity button always focusable. That's not the case anymore. It's only focusable if the location bar has already focus, which is a) a less likely workflow and b) less strange and annoying than focusing and selecting the address when the panel is dismissed, regardless of where the focus was before.

> It also keeps
> focus if I dismiss the popup by clicking on a text field in content

I don't see this. What I see is that clicking a text field, like clicking anywhere else, gives focus to where it was before, because we consume the rollup event.
Flags: wanted-firefox3.1?
Flags: wanted-firefox3.1+
Flags: blocking-firefox3.1?
Flags: blocking-firefox3.1-
Whiteboard: [polish-easy] [polish-interactive]
Target Milestone: --- → Firefox 3.1
Ping Gavin
Comment on attachment 334888 [details] [diff] [review]
patch

OK, that makes sense. We'll have to mark bug 403981 WONTFIX when this lands though.

http://mxr-test.konigsberg.mozilla.org/addons/search?string=focusandselecturlbar has only two hits, one is a copy of browser.xul named browser3.0.xul, and the other is safeguarded by an if (window.focusAndSelectURLBar) check, so I guess we're probably OK to remove it even though we shipped it in 3.0.
Attachment #334888 - Flags: review?(gavin.sharp) → review+
http://hg.mozilla.org/mozilla-central/rev/0e067665df55
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Target Milestone: Firefox 3.1 → Firefox 3.2a1
Attachment #334888 - Flags: approval1.9.1?
Comment on attachment 334888 [details] [diff] [review]
patch

a191=beltzner
Attachment #334888 - Flags: approval1.9.1? → approval1.9.1+
Keywords: checkin-needed
I would have preferred we not remove focusAndSelectURLBar on the branch, despite comment 17...
(In reply to comment #21)
> I would have preferred we not remove focusAndSelectURLBar on the branch,
> despite comment 17...

http://hg.mozilla.org/releases/mozilla-1.9.1/rev/4d2253d3fcf0
verified FIXED on builds:

Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2a1pre) Gecko/20090507 Minefield/3.6a1pre ID:20090507032833

and

Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b5pre) Gecko/20090507 Shiretoko/3.5b5pre ID:20090507034334
Status: RESOLVED → VERIFIED
This bug's priority relative to the set of other polish bugs is:
P1 - Polish issue that appears in the main window, or is something that the user may encounter several times a day.

effected the main window.
Whiteboard: [polish-easy] [polish-interactive] → [polish-easy] [polish-interactive][polish-p1]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: