Closed
Bug 343628
Opened 18 years ago
Closed 18 years ago
Double-clicking a close button of a tab should never open a new tab
Categories
(Firefox :: Tabbed Browser, defect, P2)
Firefox
Tabbed Browser
Tracking
()
RESOLVED
FIXED
Firefox 2 beta2
People
(Reporter: asaf, Assigned: asaf)
References
Details
(Keywords: fixed1.8.1, regression)
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
robert.strong.bugs
:
review+
mtschrep
:
approval1.8.1+
|
Details | Diff | Splinter Review |
Seen on Windows 1.8 branch build.
1. Open two tabs
2. double click the close button of the second tab
Actual results: the second tab is closed but another tab is added as well.
Assignee | ||
Updated•18 years ago
|
Flags: blocking-firefox2?
Comment 1•18 years ago
|
||
I'm marking this as a regression, since it changes the functionality of a double click on the closebox as opposed to Firefox 1.5 and will likely be a pretty large nuisance. Not urgent enough to rush for beta1, though, but needs to be there for beta2.
Flags: blocking-firefox2? → blocking-firefox2+
Keywords: regression
Target Milestone: --- → Firefox 2 alpha2
Comment 2•18 years ago
|
||
taking and setting TM to FF2B2.
I have a feeling the fix will be to this code:
http://lxr.mozilla.org/seamonkey/source/toolkit/content/widgets/tabbrowser.xml#1461
1459 if (aEvent.button == 0 &&
1460 aEvent.originalTarget.localName == "box") {
1461 // xxx this needs to check that we're in the empty area of the tabstrip
1462 var e = document.createEvent("Events");
1463 e.initEvent("NewTab", true, true);
1464 this.dispatchEvent(e);
1465 }
Assignee: nobody → sspitzer
Target Milestone: Firefox 2 alpha2 → Firefox 2 beta2
Comment 3•18 years ago
|
||
*** Bug 332553 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 4•18 years ago
|
||
-> me since I think I know what's going on here.
Assignee: sspitzer → bugs.mano
Assignee | ||
Updated•18 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 5•18 years ago
|
||
hacky, but AFAICT there's nothing else we can do.
This should also fix bug 343061.
Attachment #228286 -
Flags: review?(mconnor)
Comment 6•18 years ago
|
||
Comment on attachment 228286 [details] [diff] [review]
patch
mconnor's on vacation, please ask someone else for review (gavin? ben?)
Attachment #228286 -
Flags: review?(mconnor)
Assignee | ||
Comment 7•18 years ago
|
||
This actually applies.
Attachment #228286 -
Attachment is obsolete: true
Attachment #228337 -
Flags: review?
Assignee | ||
Updated•18 years ago
|
Attachment #228337 -
Flags: review? → review?(robert.bugzilla)
Assignee | ||
Comment 8•18 years ago
|
||
Comment on attachment 228337 [details] [diff] [review]
patch
Note to self:
s/both/bothe
s/browser.xml/globalBindings.xml
Comment 9•18 years ago
|
||
Comment on attachment 228337 [details] [diff] [review]
patch
Mano, I was unable to think of a better solution for this than using mousemove as you have done. Do you think a better solution could be found before beta 2? Also, it seems that with this patch I no longer get tab close buttons on every tab though I didn't spend any time trying to figure out why.
Assignee | ||
Comment 10•18 years ago
|
||
I was not able to think of a better solution (not even in the long term), since there are separate OS events here :-/ One might think of a blocking timer as a click handler, but i think we're going to notice all sort of too-short-timer bugs if we do so.
As for close buttons on all tabs, did you make sure the xul.css change was packaged, on which OS did you test?
Assignee | ||
Comment 11•18 years ago
|
||
(In reply to comment #9)
> (From update of attachment 228337 [details] [diff] [review] [edit])
> it seems that with this patch I no longer get tab close buttons on every
> tab though I didn't spend any time trying to figure out why.
WFM on windows (w/o setting browser.tabs.closeButtons).
Assignee | ||
Updated•18 years ago
|
OS: Windows XP → All
Priority: -- → P2
Hardware: PC → All
Comment 12•18 years ago
|
||
Comment on attachment 228337 [details] [diff] [review]
patch
>Index: toolkit/content/widgets/tabbrowser.xml
...
>@@ -2586,16 +2589,61 @@
...
>+ /* XXXmano hack:
>+ * Since we're removing the event target, if the user
>+ * double-clicks this button, the dblclick event will be dispatched
>+ * with the tabbar as its event target (and explicit/originalTarget),
>+ * which treats that as a mouse gesture for opening a new tab.
>+ * In this context, there is no way to prevent the dispatching
>+ * of the dblclick event, so we're manually blocking it (see
>+ * onTabBarDblClick) until the mouse is moved.
>+ */
nit: add this bug number for reference and the fixes from your comment #8
I'm not thrilled with this fix but I don't see any other way of doing this without significantly restructuring the pre-existing content and code which wouldn't be a good thing for 1.8.1 IMO. Otherwise, looks good and good job with keeping this minimal considering the circumstances.
Attachment #228337 -
Flags: review?(robert.bugzilla) → review+
Assignee | ||
Comment 13•18 years ago
|
||
trunk:
mozilla/toolkit/content/xul.css 1.80
mozilla/toolkit/content/widgets/tabbrowser.xml 1.165
mozilla/toolkit/themes/pinstripe/global/globalBindings.xml 1.9
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•18 years ago
|
Attachment #228337 -
Flags: approval1.8.1?
Updated•18 years ago
|
Attachment #228337 -
Flags: approval1.8.1? → approval1.8.1+
Assignee | ||
Comment 14•18 years ago
|
||
1.8 branch:
mozilla/toolkit/content/xul.css 1.61.2.16
mozilla/toolkit/content/widgets/tabbrowser.xml 1.103.2.54
mozilla/toolkit/themes/pinstripe/global/globalBindings.xml 1.3.12.3
Keywords: fixed1.8.1
You need to log in
before you can comment on or make changes to this bug.
Description
•