Open Bug 1441637 Opened 6 years ago Updated 2 years ago

The list of tabs for home page is miscalculated when closing a tab switches to preferences

Categories

(Firefox :: Tabbed Browser, enhancement, P3)

enhancement

Tracking

()

People

(Reporter: zbraniecki, Unassigned)

Details

`_updateUseCurrentButton` uses `_getTabsForHomePage` to calculate the number of pages that should be used for home page.

The list is refreshed when Preferences pane gets in focus in order to update the string between `Use current page` and `Use current pages`.

Tab warming changed the equation here because if the preferences tab is selected because we're closing another tab, the focus comes before the other tab is closed.

This means that the number of tabs gets miscalculated.

A solution might be to filter out tabs that have `closing` attribute set to true, except that the current code sets the attribute *after* it focuses the new tab.
So, the ultimate solution should be to set the `closing` attribute before focusing the new tab.
Summary: Tab browser → The list of tabs for home page is miscalculated when closing a tab switches to preferences
This is pretty minor but it should also be fairly trivial to fix. Moving the setting of the closing attribute to before focusing the new tab doesn't seem to have any negative effects, and we almost did that anyway for a detail of Bug 1176019.
Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.