commit 5d147cfe5a93ee29e74338485dabf45678eaedc8
parent 0c757dda4ee784e34485f6e415d31f5e633bfbf1
Author: Tanvi Manku <tanvi.manku@gmail.com>
Date: Wed, 17 Dec 2025 21:45:16 +0000
Bug 2002928: Disable "Add new payment method" button when payment autofill setting is disabled. r=mtigley,mkennedy
Differential Revision: https://phabricator.services.mozilla.com/D276673
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/browser/components/preferences/main.js b/browser/components/preferences/main.js
@@ -1329,11 +1329,13 @@ Preferences.addSetting({
Preferences.addSetting({
id: "add-payment-button",
+ deps: ["saveAndFillPayments"],
onUserClick: ({ target }) => {
target.ownerGlobal.gSubDialog.open(
"chrome://formautofill/content/editCreditCard.xhtml"
);
},
+ disabled: ({ saveAndFillPayments }) => !saveAndFillPayments.value,
});
Preferences.addSetting({