- From: Ben Gummer <notifications@github.com>
- Date: Wed, 21 Sep 2016 16:53:31 -0700
- To: w3c/webcomponents <webcomponents@noreply.github.com>
- Message-ID: <w3c/webcomponents/issues/572@github.com>
I'm currently trying to build a form using custom elements, where each custom element generates an `<input />` inside the custom element shadow root.
Something like this:
```html
<form>
<my-input>
<!-- shadow root -->
<input type="text" name="fname" id="fname" />
</my-input>
<my-input>
<!-- shadow root -->
<input type="text" name="lname" id="lname" />
</my-input>
<my-input>
<!-- shadow root -->
<input type="text" name="email" id="email" />
</my-input>
<input type="submit" value="submit" />
</form>
```
The above example doesn't seem to trigger autofill behaviour (i.e. loading the first name, last name, email from the browser profile).
Is there a recommended way of building custom element form inputs with shadow DOM while retaining autofill behaviour?

I've raised a Chrome [issue](https://bugs.chromium.org/p/chromium/issues/detail?id=649162) for this with an example [codepen](http://s.codepen.io/bgummeratlassian/debug/Egkarq) (you'll need to view that in Chrome canary), but I'm not 100% sure yet whether this is a feature or drawback in shadow DOM.
P.S. the above code example wouldn't submit any values but hopefully https://github.com/w3c/webcomponents/issues/187 will fix that
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/572
Received on Wednesday, 21 September 2016 23:54:27 UTC