From 80f21e89a7d19ad8daabc7042a1b04f2b040c8bb Mon Sep 17 00:00:00 2001 From: Ian Neal Date: Mon, 11 Nov 2019 20:39:32 +0100 Subject: [PATCH] Bug 1591791 - Port |Bug 1584809 - PageInfo cookie permissions default to allow| to SeaMonkey. r=frg DONTBUILD --- suite/browser/pageinfo/permissions.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/suite/browser/pageinfo/permissions.js b/suite/browser/pageinfo/permissions.js index bf9953e949..f4a3f51605 100644 --- a/suite/browser/pageinfo/permissions.js +++ b/suite/browser/pageinfo/permissions.js @@ -193,8 +193,12 @@ function onCheckboxClick(aPartId) function onRadioClick(aPartId) { var radioGroup = document.getElementById(aPartId + "RadioGroup"); - var id = radioGroup.selectedItem ? radioGroup.selectedItem.id : "#1"; - var permission = parseInt(id.split("#")[1]); + let permission; + if (radioGroup.selectedItem) { + permission = parseInt(radioGroup.selectedItem.id.split("#")[1]); + } else { + permission = SitePermissions.getDefault(aPartId); + } SitePermissions.setForPrincipal(gPermPrincipal, aPartId, permission); }