Skip to content

Incubation: FormControlRange - Live ranges for <input> and <textarea> #1142

@stephanieyzhang

Description

@stephanieyzhang

Explainer

https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/FormControlRange/explainer.md

The explainer

Where and by whom is the work is being done?

  • GitHub repo:

  • Primary contacts:

  • Organization/project driving the design: Microsoft Edge

  • This work is being funded by: Microsoft

  • Incubation and standards groups that have discussed the design:

  • Standards group(s) that you expect to discuss and/or adopt this work when it's
    ready: WHATWG DOM, WHATWG HTML

Feedback so far

You should also know that...

Currently, web developers can’t perform range-based operations (e.g., getting bounding rects, setting custom highlights) inside native text controls (<input>, <textarea>). As a result, they often resort to workarounds such as replicating the control and its styles in a contenteditable container and reimplementing input behavior -- an approach that’s tedious and error-prone to keep in sync with native behavior.

FormControlRange is a specialized, live AbstractRange subclass scoped to input/textarea value space. It enables those operations directly in native controls while restricting standard Range mutations to preserve encapsulation. It integrates cleanly with existing selection/editing behavior and closes a long-standing gap for form controls.


Track conversations at https://tag-github-bot.w3.org/gh/w3ctag/design-reviews/1142

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions