Closed
Bug 343803
Opened 20 years ago
Closed 20 years ago
Recently Closed Tabs > Open in Tabs shouldn't overwrite currently-opened tab
Categories
(Firefox :: Menus, defect)
Tracking
()
RESOLVED
FIXED
Firefox 2 beta2
People
(Reporter: ispiked, Assigned: dietrich)
References
Details
(Keywords: fixed1.8.1)
Attachments
(2 files)
|
1.19 KB,
patch
|
Details | Diff | Splinter Review | |
|
2.09 KB,
patch
|
dietrich
:
review+
mconnor
:
approval1.8.1+
|
Details | Diff | Splinter Review |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1a3) Gecko/20060706 BonEcho/2.0a3
Steps to reproduce:
1. Open a few tabs; close a few tabs.
2. Go to History > Recently Closed Tabs > and choose Open in Tabs.
Results:
The first item in the list is loaded in the current tab, while the other items are opened in new tabs.
Expected results:
I would expect this to behave just like it does when a single tab is undone -- e.g. the tab is opened just where it was when it was closed.
| Reporter | ||
Updated•20 years ago
|
Summary: Recently Opened Tabs > Open in Tabs shouldn't overwrite currently-opened tab → Recently Closed Tabs > Open in Tabs shouldn't overwrite currently-opened tab
| Assignee | ||
Updated•20 years ago
|
Assignee: nobody → dietrich
| Assignee | ||
Comment 1•20 years ago
|
||
Attachment #228359 -
Flags: review?(mconnor)
| Assignee | ||
Comment 2•20 years ago
|
||
I was attempting to be consistent w/ what "open in tabs" does for bookmarks and history. But overwriting existing tabs is bad. This is good.
Status: NEW → ASSIGNED
Flags: blocking-firefox2?
Target Milestone: --- → Firefox 2 beta2
Updated•20 years ago
|
Flags: blocking-firefox2? → blocking-firefox2+
Comment 3•20 years ago
|
||
*** Bug 343939 has been marked as a duplicate of this bug. ***
Comment 4•20 years ago
|
||
>Index: browser/base/content/browser.js
>+ m.addEventListener("command", function() {
>+ for (var i = 0; i < urls.length; i++)
>+ undoCloseTab(urls[i]);
>+ }, false);
urls[i] is an URL while undoCloseTab expects an integer index (which incidentally will have to be 0 in all cases).
The attached patch does away with the URLs completely (they're never needed) and for sake of clarity calls undoCloseTab with no argument at all (i.e. just reopen the most recently closed tab).
The only thing to consider is whether to focus the first (most recently closed) or the last restored tab (which currently happens). NB: reopening the tabs in inverse order might result in an incorrect tab order.
Attachment #228559 -
Flags: review?(dietrich)
| Assignee | ||
Updated•20 years ago
|
Attachment #228359 -
Flags: review?(mconnor)
| Assignee | ||
Comment 5•20 years ago
|
||
Comment on attachment 228559 [details] [diff] [review]
fix
tested this and it looks good, thanks! we can deal with the focus question as part of bug 342432.
Attachment #228559 -
Flags: review?(dietrich) → review+
Updated•20 years ago
|
Whiteboard: [checkin needed]
| Assignee | ||
Comment 6•20 years ago
|
||
Fixed on trunk.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Whiteboard: [checkin needed]
| Assignee | ||
Comment 7•20 years ago
|
||
Comment on attachment 228559 [details] [diff] [review]
fix
Problem: The current "Open All in Tabs" implementation uses the old openOneOrMoreURIs function, which overwrites existing tabs and doesn't restore state.
Solution: Use the undoCloseTab function, which will re-open the tabs in their original location and state.
Risk: Low
Attachment #228559 -
Flags: approval1.8.1?
Comment 8•20 years ago
|
||
Comment on attachment 228559 [details] [diff] [review]
fix
a=mconnor on behalf of drivers
Attachment #228559 -
Flags: approval1.8.1? → approval1.8.1+
Updated•20 years ago
|
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Whiteboard: [checkin needed (1.8 branch)]
Comment 9•20 years ago
|
||
I'm assuming the fact that this was reopened is a mistake...
Status: REOPENED → RESOLVED
Closed: 20 years ago → 20 years ago
Resolution: --- → FIXED
Comment 10•20 years ago
|
||
Don't know why but these radio buttons have a tendency of changing state when reloading a bug after logging in. My bad.
| Assignee | ||
Updated•20 years ago
|
Keywords: fixed1.8.1
Whiteboard: [checkin needed (1.8 branch)]
You need to log in
before you can comment on or make changes to this bug.
Description
•