Skip to content

Commit 482aa54

Browse files
committed
Fix tabs.selectAlternateTab()
This issue is related to revision 664ba3b1df17 and issue 847, Fixes issue 897
1 parent 0748d3a commit 482aa54

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

common/content/tabs.js

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -526,17 +526,10 @@ const Tabs = Module("tabs", {
526526
* Selects the alternate tab.
527527
*/
528528
selectAlternateTab: function () {
529-
liberator.assert(tabs.alternate != null && tabs.getTab() != tabs.alternate, "No alternate page");
529+
let alternate = tabs.alternate;
530+
liberator.assert(alternate != null && tabs.getTab() != alternate, "No alternate page");
530531

531-
// NOTE: this currently relies on v.tabs.index() returning the
532-
// currently selected tab index when passed null
533-
let index = tabs.index(tabs.alternate);
534-
535-
// TODO: since a tab close is more like a bdelete for us we
536-
// should probably reopen the closed tab when a 'deleted'
537-
// alternate is selected
538-
liberator.assert(index >= 0, "Alternate buffer does not exist"); // TODO: This should read "Buffer N does not exist"
539-
tabs.select(index, false, true);
532+
config.tabbrowser.tabContainer.selectedItem = alternate;
540533
},
541534

542535
// NOTE: when restarting a session FF selects the first tab and then the

0 commit comments

Comments
 (0)