diff --git a/browser/extensions/formautofill/content/addressFormLayout.mjs b/browser/extensions/formautofill/content/addressFormLayout.mjs index 5e48e6afaad1..a50fcf81f0f9 100644 --- a/browser/extensions/formautofill/content/addressFormLayout.mjs +++ b/browser/extensions/formautofill/content/addressFormLayout.mjs @@ -16,6 +16,9 @@ const fieldTemplates = { name: item.fieldId, required: item.required, value: item.value ?? "", + // Conditionally add pattern attribute since pattern=""/false/undefined + // results in weird behaviour. + ...(item.pattern && { pattern: item.pattern }), }; }, input(item) {