Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open new tabs in same container as previous tab #990

Closed
wants to merge 1 commit into from

Conversation

tlaundal
Copy link

This PR adds functionality that will try to open new tabs in the same container as the previously active tab in that window, if the new tab doesn't already have a container, and the previously active tab did.

Some undocumented / implicity functionality in the webextension API is used:

  • onCreated is called for a new tab before onActivated for that tab is called
  • onUpdated will be called for all new tabs, also about:newtab and the like (sets the favicon)
  • The first onUpdated for a new tab, that is not an about:-tab, will set the URL

It is a little bit wonky, as the original new tab is created and displayed (although not loaded) before it can be closed and a new tab can be created. However, it is the best workaround I can find to add this functionality until Bugzilla 1406371 is solved.

This would fix #462, #448 and #406 (I think)
Also relates to #943 and #544

This commit adds functionality that will try to open new tabs in the same container as the previously active tab in that window, if the new tab doesn't already have a container, and the previously active tab did.
Some undocumented / implicity functionality in the webextension API is used:
 * `onCreated` is called for a new tab before `onActivated` for that tab is called
 * `onUpdated` will be called for all new tabs, also `about:newtab` and the like (sets the favicon)
 * The first `onUpdated` for a new tab, that is not an `about:`-tab, will set the URL

It is a little bit wonky, as the original new tab is created and displayed (although not loaded) before it can be closed a new tab can be created. However, it is the best workaround I can find to add this functionality until Bugzilla 1406371 is solved.

This would fix mozilla#462, mozilla#448 and mozilla#406 (I think)
Also relates to mozilla#943 and mozilla#544
tlaundal added a commit to tlaundal/multi-account-containers that referenced this pull request Nov 21, 2017
@mandawan
Copy link

Thanks for the PR ! Hope it'll be reviewed merged, and deployed on store soon.

@beatgammit
Copy link

Also relates to #1000

@jonathanKingston
Copy link
Contributor

Thanks for the PR!
However we will be moving forward with the platform bug instead: Bugzilla 1406371 this hopefully should land in Nightly this week.

@m4dc4p
Copy link

m4dc4p commented Jan 29, 2019

Been a year - the platform bug never landed AFAICT. Could this PR get revived? I would really like functionality similar to the "sticky containers" extension (which I would use if it wasn't so buggy).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Option to open new Tabs in the same Container
5 participants