commit 1757b53dcc61de7391e82e48a472e2bed4f3d9b5
parent 46ab4c9b906cc0663886c38171c2801c8d764f7e
Author: Sandor Molnar <smolnar@mozilla.com>
Date: Tue, 21 Oct 2025 21:09:05 +0300
Revert "Bug 1935980 - if a field is not identified but has type='tel', assume it is a tel field r=NeilDeakin,credential-management-reviewers" for causing bc failures @ browser_HomeDepot.js
This reverts commit 62e523ce64f5a2fd04523e2217667393a5faaa0b.
Diffstat:
2 files changed, 0 insertions(+), 32 deletions(-)
diff --git a/browser/extensions/formautofill/test/browser/heuristics/browser_parse_tel_fields.js b/browser/extensions/formautofill/test/browser/heuristics/browser_parse_tel_fields.js
@@ -34,30 +34,4 @@ add_heuristic_tests([
},
],
},
- {
- description:
- "Address form where type='tel' must be checked to identify telephone field",
- fixtureData: `
- <form>
- <input type="text" id="name" autocomplete="name"/>
- <input type="text" id="country" autocomplete="country"/>
- <input type="text" id="street-address" autocomplete="street-address"/>
- <input type="text" id="address-line1" autocomplete="address-line1"/>
- <input type="tel"/>
- </form>`,
- expectedResult: [
- {
- default: {
- reason: "autocomplete",
- },
- fields: [
- { fieldName: "name" },
- { fieldName: "country" },
- { fieldName: "street-address" },
- { fieldName: "address-line1" },
- { fieldName: "tel", reason: "regex-heuristic" },
- ],
- },
- ],
- },
]);
diff --git a/toolkit/components/formautofill/shared/FormAutofillHeuristics.sys.mjs b/toolkit/components/formautofill/shared/FormAutofillHeuristics.sys.mjs
@@ -1111,12 +1111,6 @@ export const FormAutofillHeuristics = {
fathomFoundType
);
- // If regular expression based heuristics doesn't find any matched field name,
- // and the input type is "tel", just use "tel" as the field name.
- if (!matchedFieldNames.length && element.type == "tel") {
- return ["tel", inferredInfo];
- }
-
return [matchedFieldNames, inferredInfo];
},