Closed Bug 624148 Opened 10 years ago Closed 10 years ago

Middle clicking tab bar with tabs in title bar doesn't open a new tab

Categories

(Firefox :: Tabbed Browser, defect)

x86
Windows 7
defect
Not set
normal

Tracking

()

VERIFIED FIXED
Firefox 4.0b10

People

(Reporter: gustavo.silva, Assigned: Felipe)

References

Details

Attachments

(1 file, 1 obsolete file)

User-Agent:       Mozilla/5.0 (Windows NT 6.1; rv:2.0b9pre) Gecko/20110108 Firefox/4.0b9pre
Build Identifier: Mozilla/5.0 (Windows NT 6.1; rv:2.0b9pre) Gecko/20110108 Firefox/4.0b9pre

In the latest Minefield nightly (2011-01-08), tabs appear on the title bar by default. However, when middle clicking an empty space on that bar, nothing happens.

Reproducible: Always

Steps to Reproduce:
1. Middle click an empty space on the tab bar (tabs must be on title bar).
Actual Results:  
Nothing happens.

Expected Results:  
A new tab should be created.
Component: General → Tabbed Browser
Version: unspecified → Trunk
Blocks: 572160
Status: UNCONFIRMED → NEW
Ever confirmed: true
Same for me, but with the menu bar on it still works.
Confirmed
QA Contact: general → tabbed.browser
What is failing here is this check:

http://mxr.mozilla.org/mozilla-central/source/browser/base/content/tabbrowser.xml#3042

The originalTarget in this case is the parent scrollbox. This is due to pointer-events: none on the .scrollbox-innerbox. For the Aero theme the pointer-events: none on the #titlebar-spacer should be enough, I don't know about the other themes yet
Attached patch Patch (obsolete) — Splinter Review
Classic/aero basic also behave well. Untested on Luna but I think it'll be the same. Dao do you have a XP vm to test this?

(By behaving well I'm assuming -> middle click for new tab, dbl click for restore window)
Assignee: nobody → felipc
Status: NEW → ASSIGNED
Attachment #502658 - Flags: review?(dao)
Comment on attachment 502658 [details] [diff] [review]
Patch

How does this handle double clicks?
Double click is being handled automatically as a hit in non-client area through the use of the toolbar-drag binding, and the system performs the default action of restoring the window. But now that you mention it I'm not sure what's the case with XP.
Comment on attachment 502658 [details] [diff] [review]
Patch

Seems to works on XP.

>-#titlebar-spacer,
>-#main-window[tabsintitlebar]:not([inFullscreen]) .tabbrowser-arrowscrollbox > scrollbox > .scrollbox-innerbox {
>+#titlebar-spacer {
>   pointer-events: none;
> }
> 
> .tabbrowser-tab,
> .tabs-newtab-button {
>   pointer-events: auto;
> }

This change should make pointer-events: auto; for .tabbrowser-tab and .tabs-newtab-button unnecessary.
Attachment #502658 - Flags: review?(dao) → review-
Attached patch Patch v2Splinter Review
removed the redundant pointer-events
Attachment #502658 - Attachment is obsolete: true
Attachment #504866 - Flags: review?(dao)
FWIW I've also tested this together with the patch from bug 624157
Attachment #504866 - Flags: review?(dao) → review+
http://hg.mozilla.org/mozilla-central/rev/f5819377a399
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 4.0b10
Verified fixes with Mozilla/5.0 (Windows NT 6.1; rv:2.0b10pre) Gecko/20110121 Firefox/4.0b10pre

Could we get an automated test for this feature?
Status: RESOLVED → VERIFIED
Flags: in-testsuite?
Flags: in-litmus?
You need to log in before you can comment on or make changes to this bug.