Closed Bug 1478112 Opened 6 years ago Closed 6 years ago

Sort out how to best call `this._getSwitcher().requestTab` and `this.updateCurrentBrowser` during tabpanels selectedIndex change

Categories

(Firefox :: Tabbed Browser, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
Firefox 63
Tracking Status
firefox63 --- fixed

People

(Reporter: bgrins, Assigned: mconley)

References

(Blocks 1 open bug, Regressed 2 open bugs)

Details

Attachments

(1 file)

See the discussion starting at https://bugzilla.mozilla.org/show_bug.cgi?id=1442582#c23. Bug 1442582 gets rid of the extended XBL binding that unconditionally calls `gBrowser._getSwitcher().requestTab` before emitting the select event by having the tabpanels binding emit a new "preselect" event which allows the tabbed browser to run logic regardless of whether selection changed. From https://bugzilla.mozilla.org/show_bug.cgi?id=1442582#c23: > My best guess at the moment is that the async switcher causes some > focus-related side effects such that when you click on an already-selected > tab but something else is focused (another window or a popup notification), > we still need to call it.
Needinfo me to needinfo mconley when he's back. This requestTab being called unconditionally via the preselect event: https://hg.mozilla.org/mozilla-central/annotate/6b30047d863c/toolkit/content/widgets/tabbox.xml#l618 Here's the selectedIndex setter bailing out because the tabpanel in question was already selected: https://hg.mozilla.org/mozilla-central/annotate/6b30047d863c/toolkit/content/widgets/tabbox.xml#l626
Flags: needinfo?(dao+bmo)
Priority: -- → P3
Flags: needinfo?(dao+bmo) → needinfo?(mconley)
Looking.
The "select" event handler workaround was originally added in bug 1379270 to make it possible to focus and select the URL bar a little bit later. This ugly hack was to workaround an issue with WebExtensions that override about:newtab with the chrome_url_overrides property (the issue would be that the URL bar would not be properly focused and selected if about:newtab was overridden). Back in the day, this was necessary because the overriding URL was fully displayed in the URL bar (moz-webextension://...). These days, when about:newtab is overridden, the URL bar is still empty - we just end up showing the information about the WebExtension overriding about:newtab to the left of the URL bar. So I think we can remove the old workaround.
Comment on attachment 9001402 [details] Bug 1478112 - Get rid of preselect tabbox workaround, and adjust focus after changing visible tab right away. r?dao Dão Gottwald [::dao] has approved the revision.
Attachment #9001402 - Flags: review+
Pushed by dgottwald@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a022c40e4d55 Get rid of preselect tabbox workaround, and adjust focus after changing visible tab right away. r=dao
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 63
Depends on: 1523946
Regressions: 1555284
Regressions: 1565751
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: