Merge pull request #1815 from mozilla/1781-site-isolation-save-fix
Site isolation saved changes do not affect other containers
This commit is contained in:
commit
c18cdfc88c
3 changed files with 14 additions and 8 deletions
|
@ -2,7 +2,7 @@
|
|||
"name": "testpilot-containers",
|
||||
"title": "Multi-Account Containers",
|
||||
"description": "Containers helps you keep all the parts of your online life contained in different tabs. Custom labels and color-coded tabs help keep different activities — like online shopping, travel planning, or checking work email — separate.",
|
||||
"version": "7.0.1",
|
||||
"version": "7.0.2",
|
||||
"author": "Andrea Marchesini, Luke Crouch and Jonathan Kingston",
|
||||
"bugs": {
|
||||
"url": "https://github.com/mozilla/multi-account-containers/issues"
|
||||
|
|
|
@ -30,6 +30,13 @@ const P_CONTAINER_DELETE = "containerDelete";
|
|||
const P_CONTAINERS_ACHIEVEMENT = "containersAchievement";
|
||||
const P_CONTAINER_ASSIGNMENTS = "containerAssignments";
|
||||
|
||||
function addRemoveSiteIsolation() {
|
||||
const identity = Logic.currentIdentity();
|
||||
browser.runtime.sendMessage({
|
||||
method: "addRemoveSiteIsolation",
|
||||
cookieStoreId: identity.cookieStoreId
|
||||
});
|
||||
}
|
||||
|
||||
async function getExtensionInfo() {
|
||||
const manifestPath = browser.extension.getURL("manifest.json");
|
||||
|
@ -1242,6 +1249,9 @@ Logic.registerPanel(P_CONTAINER_EDIT, {
|
|||
initialize() {
|
||||
this.initializeRadioButtons();
|
||||
Utils.addEnterHandler(document.querySelector("#close-container-edit-panel"), () => {
|
||||
// Resets listener from siteIsolation checkbox to keep the update queue to 0.
|
||||
const siteIsolation = document.querySelector("#site-isolation");
|
||||
siteIsolation.removeEventListener("change", addRemoveSiteIsolation, false);
|
||||
const formValues = new FormData(this._editForm);
|
||||
if (formValues.get("container-id") !== NEW_CONTAINER_ID) {
|
||||
this._submitForm();
|
||||
|
@ -1337,14 +1347,10 @@ Logic.registerPanel(P_CONTAINER_EDIT, {
|
|||
containerName.select();
|
||||
containerName.focus();
|
||||
});
|
||||
|
||||
const siteIsolation = document.querySelector("#site-isolation");
|
||||
siteIsolation.checked = !!identity.isIsolated;
|
||||
siteIsolation.addEventListener( "change", function() {
|
||||
browser.runtime.sendMessage({
|
||||
method: "addRemoveSiteIsolation",
|
||||
cookieStoreId: identity.cookieStoreId
|
||||
});
|
||||
});
|
||||
siteIsolation.addEventListener( "change", addRemoveSiteIsolation, false);
|
||||
[...document.querySelectorAll("[name='container-color']")].forEach(colorInput => {
|
||||
colorInput.checked = colorInput.value === identity.color;
|
||||
});
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"manifest_version": 2,
|
||||
"name": "Firefox Multi-Account Containers",
|
||||
"version": "7.0.1",
|
||||
"version": "7.0.2",
|
||||
"incognito": "not_allowed",
|
||||
"description": "Multi-Account Containers helps you keep all the parts of your online life contained in different tabs. Custom labels and color-coded tabs help keep different activities — like online shopping, travel planning, or checking work email — separate.",
|
||||
"icons": {
|
||||
|
|
Loading…
Add table
Reference in a new issue