Bug 264956 - Safari ignores autofill scopes with same form owner
Summary: Safari ignores autofill scopes with same form owner
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: Safari Technology Preview
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-11-16 08:40 PST by Anthony Frehner
Modified: 2023-11-23 07:59 PST (History)
5 users (show)

See Also:


Attachments
Shows Safari incorrectly autofilling multiple autofill scopes (1.50 MB, video/quicktime)
2023-11-16 08:40 PST, Anthony Frehner
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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>