From 33728c1df8f036eb8458ce23588e38121342c4bc Mon Sep 17 00:00:00 2001 From: Issam Mani Date: Tue, 8 Oct 2024 15:26:55 +0200 Subject: [PATCH] fix: only ping swift when section is valid --- .../Client/Assets/CC_Script/FormAutofillChild.ios.sys.mjs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/firefox-ios/Client/Assets/CC_Script/FormAutofillChild.ios.sys.mjs b/firefox-ios/Client/Assets/CC_Script/FormAutofillChild.ios.sys.mjs index 053c65ffe1be..e5844375a999 100644 --- a/firefox-ios/Client/Assets/CC_Script/FormAutofillChild.ios.sys.mjs +++ b/firefox-ios/Client/Assets/CC_Script/FormAutofillChild.ios.sys.mjs @@ -110,6 +110,13 @@ export class FormAutofillChild { return; } + // Since iOS doesn't support cross frame autofill, + // we should only call the autofill callback if the section is valid. + // TODO(issam): This will change when we have cross frame fill support. + if (!this.activeSection.isValidSection()) { + return; + } + const fieldNamesWithValues = this.transformToFieldNamesWithValues( this.activeSection.fieldDetails );