Open Bug 1441637 Opened 8 years ago Updated 1 year ago

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

Categories

(Firefox :: Tabbed Browser, defect, P3)

defect

Tracking

()

People

(Reporter: zbraniecki, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

`_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
Type: enhancement → defect
Attached patch straw patchSplinter Review

I tried doing this but it caused a bunch of failures, e.g.:

TEST-UNEXPECTED-FAIL | browser/base/content/test/general/browser_bug455852.js | a new tab has been opened - Got +0, expected 1

https://treeherder.mozilla.org/jobs?repo=try&revision=9e4bee9b03e499b96c8a5e63b417c80e5d118630

Looks like this will be more tricky than hoped.

Assignee: nobody → dao+bmo

(didn't mean to assign to myself)

Assignee: dao+bmo → nobody
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: