Closed Bug 348362 Opened 18 years ago Closed 18 years ago

Don't focus a tab when mousing-down on its close-button

Categories

(Firefox :: Tabbed Browser, defect, P2)

defect

Tracking

()

RESOLVED FIXED
Firefox 2 beta2

People

(Reporter: asaf, Assigned: asaf)

References

Details

(Keywords: fixed1.8.1, polish)

Attachments

(1 file, 2 obsolete files)

It turns out we focus a tab when its close-button is clicked (mousedown, actually). This causes the themes to show a focus ring while a tab is getting closed.
Status: NEW → ASSIGNED
Flags: blocking-firefox2?
Priority: -- → P2
Target Milestone: --- → Firefox 2 beta2
Attached patch patch (obsolete) — Splinter Review
Aaron volunteered to test the impact of this patch on screen readers.
Attached patch patch (obsolete) — Splinter Review
Attachment #233264 - Attachment is obsolete: true
Attachment #233269 - Flags: review?(mconnor)
Just tested this, and unfortunately it breaks focus events for ATK and MSAA.

It would probably work if nsRootAccessible::GetTargetNode() would use the bindingParent for the event. Currently it only does that if the originalTarget is HTML, for the XUL textbox case (which has an anonymous html:input).

As a result, when the focus event comes in for the <hbox>, we don't know what accessible that relates to. Anything that gets a focus event has to have an accessible object or we won't fire an accessible event for it.

I believe that the work Alexander Surkov is doing in bug 344896 for trunk will fix this. XForms has a similar issue.

In the meantime, if you want this fix for branch I think you'll need a way to make sure the focus event occurs for the element it currently has.
Comment on attachment 233269 [details] [diff] [review]
patch

Better fix coming.
Attachment #233269 - Attachment is obsolete: true
Attachment #233269 - Flags: review?(mconnor)
Flags: blocking-firefox2? → blocking-firefox2+
Target Milestone: Firefox 2 beta2 → Firefox 2
Thanks to Aaron for suggesting this approach.
Attachment #233340 - Flags: review?(mconnor)
Whiteboard: [needs review mconnor]
Target Milestone: Firefox 2 → Firefox 2 beta2
Attachment #233340 - Flags: review?(mconnor) → review+
mozilla/toolkit/content/widgets/tabbrowser.xml 1.191
mozilla/toolkit/themes/pinstripe/global/globalBindings.xml 1.16
mozilla/toolkit/themes/pinstripe/global/browser.css 1.14
mozilla/toolkit/themes/winstripe/global/browser.css 1.18
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Whiteboard: [needs review mconnor]
Attachment #233340 - Flags: approval1.8.1?
Comment on attachment 233340 [details] [diff] [review]
a11y-friendly patch

a=drivers for MOZILLA_1_8_BRANCH
Attachment #233340 - Flags: approval1.8.1? → approval1.8.1+
1.8 branch:
mozilla/toolkit/content/widgets/tabbrowser.xml 1.103.2.81
mozilla/toolkit/themes/pinstripe/global/browser.css 1.7.4.10
mozilla/toolkit/themes/pinstripe/global/globalBindings.xml 1.3.12.10
mozilla/toolkit/themes/winstripe/global/browser.css 1.9.4.11
Keywords: fixed1.8.1
asaf, could you please double check that this is still fixed on winstripe (after mconnor's landing)?
Except bug 348959 is in the middle. But yeah, with the fix for bug 348959, this works right.
> Except bug 348959 is in the middle. But yeah, with the fix for bug 348959, this
> works right.

thanks asaf.  (yikes, I didn't notice the focus feedback was gone until just now.)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: