Giter Club home page Giter Club logo

Comments (3)

annevk avatar annevk commented on May 23, 2024

Aren't they only ignored for submission because they don't have a name attribute? It's also not really clear how these new controls relate to the custom element control. It seems like the custom element control is only used as a vehicle to insert them?

This seems more like a Stack Overflow question than an actual issue with the specification.

from html.

kleinfreund avatar kleinfreund commented on May 23, 2024

Aren't they only ignored for submission because they don't have a name attribute?

You’re right! Additionally, form reset behaves such that form controls with and without name attribute are reset. That is to say that form reset doesn’t distinguish between such controls and therefore, neither should form controls that are part of a form-associated custom element.

It's also not really clear how these new controls relate to the custom element control. It seems like the custom element control is only used as a vehicle to insert them?

That’s a byproduct of my attempt to cut down my demonstration to a minimum. In the context where I started wondering about this, it was a color picker composed of a handful of inputs (e.g. three inputs for RGB) with a form value being something like rgb(1 2 3 / 0.5). The individual input’s reset behavior was interfering with how I wanted it to work. It doesn’t make much sense to keep several value attributes on these individual controls when you already have <color picker value="rgb(0 0 0 / 0.5)"></color-picker>, but I digress.

This seems more like a Stack Overflow question than an actual issue with the specification.

That’s a fair assessment. I wasn’t sure exactly how to categorize my ask and didn’t realize it was a misunderstanding of how form controls contribute values on form submit (and really rather unrelated to form-associated custom elements in particular). Knowing that, I don’t consider this an issue with the spec anymore and will close this issue.

from html.

annevk avatar annevk commented on May 23, 2024

To be clear, creating a minimum viable example is great and very helpful. I recommend trying to go even further next time as that would have yielded <form><input value=Bob><input type=reset><input type=submit></form> and might have made it immediately apparent what was going wrong.

from html.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.