Bug 257804 - Input autocomplete for one-time-code doesn't work on iPhone Safari
Summary: Input autocomplete for one-time-code doesn't work on iPhone Safari
Status: RESOLVED DUPLICATE of bug 172567
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: Safari 16
Hardware: iPhone / iPad Unspecified
: P2 Major
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-06-07 08:01 PDT by Tomer Lichtash
Modified: 2023-06-14 10:19 PDT (History)
5 users (show)

See Also:


Attachments

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