Skip to content

The clear algorithm does not work for input elements in Range or Color state #1311

Open
@JohnChen0

Description

@JohnChen0

In chapter 14. Element Interaction:

set the value of the element to an empty string

The clear algorithm for input elements requires setting the value of the element to an empty string. However, this is not possible for input elements in Range or Color state. Both https://html.spec.whatwg.org/#range-state-(type=range) and https://html.spec.whatwg.org/#color-state-(type=color) specify that "User agents must not allow the user to set the value to the empty string."

For an input element in Range state, the clear algorithm should set its value to the default value, as given in the HTML spec. For input elements in Color state, the clear algorithm should set its value to "#000000".

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