Closed
Bug 896986
Opened 12 years ago
Closed 12 years ago
Recent closed tab history middle click only opens top entry
Categories
(Firefox :: Menus, defect)
Tracking
()
RESOLVED
FIXED
Firefox 26
| Tracking | Status | |
|---|---|---|
| firefox24 | --- | unaffected |
| firefox25 | + | disabled |
| firefox26 | --- | fixed |
People
(Reporter: jmjjeffery, Assigned: jaws)
References
Details
(Keywords: regression)
Attachments
(1 file, 3 obsolete files)
|
1.95 KB,
patch
|
Gavin
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
Looks like the issue with Recently Closed tabs has returned.
STR:
Click App-button
Click Recent Closed tabs
Try to open any tab in the closed tab list - using middle-click
NOTE: that the Top tab in the 'recent closed' list is the only one that will open.
Seems to fail if link is opened with middle-click - normal click on recent closed will open the tab...
Also happens in a new profile - no addons
cset af4e3ce8c487 ok
cset 0d0263a58f06 bad
http://hg.mozilla.org/mozilla-central/p ... 0263a58f06 regression range <- 223 cset's
need help finding the m-i regressor
| Reporter | ||
Comment 1•12 years ago
|
||
Forgot to add that left-clicking opens the link in a 'New Tab' unlike the old way of opening it on the 'active' tab, that's why using middle-click is desired if you want to reopen it in a new tab rather than the currently displayed 'active' tab.
Comment 2•12 years ago
|
||
while the code lives in the history menu, it's not related to Bookmarks & History functionality, moving to menus.
Component: Bookmarks & History → Menus
Updated•12 years ago
|
Blocks: 887515
Severity: major → normal
tracking-firefox25:
--- → ?
Keywords: regressionwindow-wanted
Version: Trunk → 25 Branch
| Assignee | ||
Comment 3•12 years ago
|
||
This may have possibly came as a result in the change of behavior with undoCloseTab.
Assignee: nobody → jaws
Status: NEW → ASSIGNED
Updated•12 years ago
|
| Assignee | ||
Comment 4•12 years ago
|
||
HistoryMenu._undoCloseMiddleClick called undoCloseTab with the index as a String, and undoCloseTab was only accepting Number arguments. It's more important to fix undoCloseTab since there may be other callers that are passing a string as the argument.
Attachment #790371 -
Flags: review?(dao)
Comment 5•12 years ago
|
||
If you're getting rid of the restriction that it has to be passed a number, shouldn't you remove the isInteger check entirely and just always coerce? Or does it still need to distinguish undefined, in which case an explicit check would probably be better...
| Assignee | ||
Comment 6•12 years ago
|
||
Good point. The previous patch actually had a bug with this in that it entered the code path for restoring multiple tabs. This is now fixed.
Attachment #790371 -
Attachment is obsolete: true
Attachment #790371 -
Flags: review?(dao)
Attachment #790447 -
Flags: review?(gavin.sharp)
Comment 7•12 years ago
|
||
Your patch works, but I took this opportunity to clean up a bit:
- use explicit vs. implicit conversion (Number() vs. +)
- adjust the bounds checking code to be more readable, the old code was hard to follow
Attachment #790447 -
Attachment is obsolete: true
Attachment #790447 -
Flags: review?(gavin.sharp)
Attachment #790464 -
Flags: review+
Attachment #790464 -
Flags: feedback?(jaws)
Comment 8•12 years ago
|
||
For aurora uplift, I'm fine just taking your patch FWIW.
| Assignee | ||
Comment 9•12 years ago
|
||
Comment on attachment 790464 [details] [diff] [review]
alternate patch
Review of attachment 790464 [details] [diff] [review]:
-----------------------------------------------------------------
::: browser/base/content/browser.js
@@ +6208,3 @@
> }
>
> while (numberOfTabsToUndoClose > 0 &&
Please move the declaration of |tab| to before the while loop since it is now not referenced until later.
Attachment #790464 -
Flags: feedback?(jaws) → feedback+
| Assignee | ||
Comment 10•12 years ago
|
||
Comment on attachment 790447 [details] [diff] [review]
Patch v2 (aurora)
Marking r+ based on https://bugzilla.mozilla.org/show_bug.cgi?id=896986#c8.
[Approval Request Comment]
Bug caused by (feature/regressing bug #): bug 887515
User impact if declined: The "Recently Closed Tabs" menu is broken.
Testing completed (on m-c, etc.): locally
Risk to taking this patch (and alternatives if risky): none expected
String or IDL/UUID changes made by this patch: none
Attachment #790447 -
Attachment description: Patch v2 → Patch v2 (aurora)
Attachment #790447 -
Attachment is obsolete: false
Attachment #790447 -
Flags: review+
Attachment #790447 -
Flags: approval-mozilla-aurora?
Updated•12 years ago
|
Attachment #790447 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Comment 11•12 years ago
|
||
Target Milestone: --- → Firefox 26
Comment 12•12 years ago
|
||
Comment on attachment 790447 [details] [diff] [review]
Patch v2 (aurora)
This doesn't handle aIndex being 0, as far as I can see. numberOfTabsToUndoClose should be 0 in that case.
Attachment #790447 -
Flags: review-
Comment 13•12 years ago
|
||
Comment on attachment 790464 [details] [diff] [review]
alternate patch
This has the same problem.
Attachment #790464 -
Flags: review-
Comment 14•12 years ago
|
||
backed out from fx-team: https://hg.mozilla.org/integration/fx-team/rev/4dbcd4a4369c
Comment 15•12 years ago
|
||
(In reply to Dão Gottwald [:dao] from comment #12)
> Comment on attachment 790447 [details] [diff] [review]
> Patch v2 (aurora)
>
> This doesn't handle aIndex being 0, as far as I can see.
> numberOfTabsToUndoClose should be 0 in that case.
Err, numberOfTabsToUndoClose needs to be 1 of course.
Comment 16•12 years ago
|
||
I would recommend:
if (isNaN(index)) {
index = 0;
numberOfTabsToUndoClose = ss.getNumberOfTabsClosedLast(window);
} else {
if (index < 0 || index >= ss.getClosedTabCount(window))
return null;
numberOfTabsToUndoClose = 1;
}
Comment 17•12 years ago
|
||
Thanks, good catch. Somewhat embarassing!
I went with your suggestion:
https://hg.mozilla.org/integration/fx-team/rev/636e3b9d1f72
We should have a test for this...
Comment 18•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Comment 19•12 years ago
|
||
So....what needs uplifting here? The Aurora patch with a+ and r- or the patch that managed to land but doesn't have approval?
status-firefox26:
--- → fixed
| Assignee | ||
Updated•12 years ago
|
Attachment #790447 -
Flags: approval-mozilla-aurora+
| Assignee | ||
Comment 20•12 years ago
|
||
(In reply to Ryan VanderMeulen [:RyanVM UTC-4] from comment #19)
> So....what needs uplifting here? The Aurora patch with a+ and r- or the
> patch that managed to land but doesn't have approval?
A new patch will need to be written and I'll re-request aurora approval. The patch that made it to m-c is good.
Comment 21•12 years ago
|
||
Let's just go with the same patch for Aurora.
Attachment #790447 -
Attachment is obsolete: true
Attachment #790464 -
Attachment is obsolete: true
Attachment #791445 -
Flags: approval-mozilla-aurora+
Comment 22•12 years ago
|
||
| Assignee | ||
Comment 23•12 years ago
|
||
Backed out of Firefox 25 since the parent bug (887515) has been backed out of Fx25.
| Assignee | ||
Comment 24•12 years ago
|
||
Backed out by bug 914258.
You need to log in
before you can comment on or make changes to this bug.
Description
•