Bug 264956

Summary: Safari ignores autofill scopes with same form owner
Product: WebKit Reporter: Anthony Frehner <afrehner.work>
Component: FormsAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: akeerthi, cdumez, mike, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: Safari Technology Preview   
Hardware: All   
OS: All   
Attachments:
Description Flags
Shows Safari incorrectly autofilling multiple autofill scopes none

Description Anthony Frehner 2023-11-16 08:40:04 PST
Created attachment 468620 [details]
Shows Safari incorrectly autofilling multiple autofill scopes

When there are multiple autofill scopes in the same form owner, Safari ignores the autofill scope and fills all fields across all scopes. Firefox and Chromium do not.

Spec:
https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill-processing-model:autofill-scope

Example (codesandbox app):
https://jxkyfc.csb.app

Source code for example:
https://codesandbox.io/s/autofilling-shipping-billing-addresses-forked-jxkyfc?file=/src/index.html

The attached video shows this incorrect behavior in Safari.

In contrast, if there are multiple form owners, then Safari respects the autofill scope and only autofills one scope at a time:

Example:
https://jzv2yd.csb.app

Source code for example:
https://codesandbox.io/s/nervous-northcutt-jzv2yd?file=/index.html
Comment 1 Radar WebKit Bug Importer 2023-11-17 21:07:28 PST
<rdar://problem/118591948>