Bug 244091

Summary: [WebAuthn] Conditional UI for webauthn autocomplete input fields does not work for input fields in shadow DOM
Product: WebKit Reporter: Kevin Flanagan <kevin.flanagan>
Component: FormsAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: akeerthi, cdumez, pascoe, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: Other   

Description Kevin Flanagan 2022-08-18 09:01:21 PDT
On the latest nightly build of Webkit on macOS 13 beta 5 the conditional UI (https://github.com/w3c/webauthn/wiki/Explainer:-WebAuthn-Conditional-UI) functionality for Passkeys does not work for input fields within a shadow DOM.

Reproducing Steps:
1. Webpage with <input autocomplete="webauthn"/ >
2. Perform webauthn get with a conditional mediation:
navigator.credentials.get({
  mediation: 'conditional',
  publicKey: {
    challenge: <challengeFromServer>,
  }
});
3. Click into the input box - note that the conditional UI appears
4. Place the input element into a shadow DOM.
5. Perform same webauthn get - the conditional UI does not connect to the shadow DOM input.
Comment 1 Kevin Flanagan 2022-08-18 12:39:08 PDT
This might be related to this issue:
https://bugs.webkit.org/show_bug.cgi?id=172567
Comment 2 Radar WebKit Bug Importer 2022-08-25 09:04:58 PDT
<rdar://problem/99140510>
Comment 3 Aditya Keerthi 2022-08-31 15:46:13 PDT
Thank you for the report!

This issue does sound similar to https://bugs.webkit.org/show_bug.cgi?id=172567.

You mentioned this reproduces on "the latest nightly build of Webkit on macOS 13 beta 5". Do you know if this worked previously, or was macOS 13 beta 5 the first build you tried? I would like to understand whether this is a regression.