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
00a1ce9dca
3 changed files with 14 additions and 8 deletions
|
@ -2,7 +2,7 @@
|
||||||
"name": "testpilot-containers",
|
"name": "testpilot-containers",
|
||||||
"title": "Multi-Account 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.",
|
"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",
|
"author": "Andrea Marchesini, Luke Crouch and Jonathan Kingston",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/mozilla/multi-account-containers/issues"
|
"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_CONTAINERS_ACHIEVEMENT = "containersAchievement";
|
||||||
const P_CONTAINER_ASSIGNMENTS = "containerAssignments";
|
const P_CONTAINER_ASSIGNMENTS = "containerAssignments";
|
||||||
|
|
||||||
|
function addRemoveSiteIsolation() {
|
||||||
|
const identity = Logic.currentIdentity();
|
||||||
|
browser.runtime.sendMessage({
|
||||||
|
method: "addRemoveSiteIsolation",
|
||||||
|
cookieStoreId: identity.cookieStoreId
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
async function getExtensionInfo() {
|
async function getExtensionInfo() {
|
||||||
const manifestPath = browser.extension.getURL("manifest.json");
|
const manifestPath = browser.extension.getURL("manifest.json");
|
||||||
|
@ -1242,6 +1249,9 @@ Logic.registerPanel(P_CONTAINER_EDIT, {
|
||||||
initialize() {
|
initialize() {
|
||||||
this.initializeRadioButtons();
|
this.initializeRadioButtons();
|
||||||
Utils.addEnterHandler(document.querySelector("#close-container-edit-panel"), () => {
|
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);
|
const formValues = new FormData(this._editForm);
|
||||||
if (formValues.get("container-id") !== NEW_CONTAINER_ID) {
|
if (formValues.get("container-id") !== NEW_CONTAINER_ID) {
|
||||||
this._submitForm();
|
this._submitForm();
|
||||||
|
@ -1337,14 +1347,10 @@ Logic.registerPanel(P_CONTAINER_EDIT, {
|
||||||
containerName.select();
|
containerName.select();
|
||||||
containerName.focus();
|
containerName.focus();
|
||||||
});
|
});
|
||||||
|
|
||||||
const siteIsolation = document.querySelector("#site-isolation");
|
const siteIsolation = document.querySelector("#site-isolation");
|
||||||
siteIsolation.checked = !!identity.isIsolated;
|
siteIsolation.checked = !!identity.isIsolated;
|
||||||
siteIsolation.addEventListener( "change", function() {
|
siteIsolation.addEventListener( "change", addRemoveSiteIsolation, false);
|
||||||
browser.runtime.sendMessage({
|
|
||||||
method: "addRemoveSiteIsolation",
|
|
||||||
cookieStoreId: identity.cookieStoreId
|
|
||||||
});
|
|
||||||
});
|
|
||||||
[...document.querySelectorAll("[name='container-color']")].forEach(colorInput => {
|
[...document.querySelectorAll("[name='container-color']")].forEach(colorInput => {
|
||||||
colorInput.checked = colorInput.value === identity.color;
|
colorInput.checked = colorInput.value === identity.color;
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"manifest_version": 2,
|
"manifest_version": 2,
|
||||||
"name": "Firefox Multi-Account Containers",
|
"name": "Firefox Multi-Account Containers",
|
||||||
"version": "7.0.1",
|
"version": "7.0.2",
|
||||||
"incognito": "not_allowed",
|
"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.",
|
"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": {
|
"icons": {
|
||||||
|
|
Loading…
Add table
Reference in a new issue