Skip to content

Custom elements not able to associate with form  #10948

Open
@Reaper88

Description

@Reaper88

Vue version

3.4.27

Link to minimal reproduction

https://stackblitz.com/edit/vitejs-vite-ikoo1s?file=src%2Fcomponents%2Fui%2Ftime-picker%2FTimePicker.ce.vue

Steps to reproduce

Choose time and submit form

What is expected?

To have the custom element as a form-associated custom element

What is actually happening?

The element is not taken as part of the form when submitted

System Info

System:
    OS: Linux 4.18 Rocky Linux 8.9 (Green Obsidian)
    CPU: (8) x64 Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
    Memory: 12.06 GB / 23.02 GB
    Container: Yes
    Shell: 4.4.20 - /bin/bash
  Binaries:
    Node: 20.9.0 - ~/.nvm/versions/node/v20.9.0/bin/node
    npm: 10.4.0 - ~/.nvm/versions/node/v20.9.0/bin/npm
    pnpm: 8.15.3 - ~/.local/share/pnpm/pnpm
  Browsers:
    Chrome: 123.0.6312.122

Any additional comments?

I've looked high and low, tried attachInternals() but on the button and a template ref doesn't work either, I'd like to have a way to associate the custom element as a form-associated custom element which we can do in vanilla js. But it's during the creation of the HTMLElement class that you can set it but we cannot modify this with the new defineCustomElement method.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions