Bug 257804

Summary: Input autocomplete for one-time-code doesn't work on iPhone Safari
Product: WebKit Reporter: Tomer Lichtash <tomerlichtash>
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Major CC: cdumez, noam, rmondello, rniwa, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 16   
Hardware: iPhone / iPad   
OS: Unspecified   

Description Tomer Lichtash 2023-06-07 08:01:54 PDT
When receiving and SMS with one-time-code, iPhone allows its users to view they code from their keyboard, and paste it as a passkey directly to the input.
However, seems that when the input is inside a web component, this feature doesn't take affect.

I've managed to bypass the issue with an external hidden input, which handles change events and updates the web component input, but this solution might not fit all cases, and the input inside a web component should be supported.

Example: This native input will work, but when the same input is inside a web component, it will not work for iPhone users:

```
    <input
      required
      type="text"
      autofocus
      autocomplete="one-time-code"
      inputmode="numeric"
      pattern="[0-9]{6}" 
      title="Enter a 6-digit passkey"
    />
```

Here's a demo with my solution: https://descope-html.vercel.app/
Comment 1 Radar WebKit Bug Importer 2023-06-09 19:01:09 PDT
<rdar://problem/110558999>
Comment 2 Ryosuke Niwa 2023-06-14 10:19:38 PDT

*** This bug has been marked as a duplicate of bug 172567 ***