Skip to content

FormControlRange - Live ranges for <input> and <textarea> #541

@stephanieyzhang

Description

@stephanieyzhang

WebKittens

@annevk

Title of the proposal

FormControlRange: live ranges for <input> and <textarea>

URL to the spec

whatwg/dom#1404

URL to the spec's repository

No response

Issue Tracker URL

whatwg/html#11478

Explainer URL

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

TAG Design Review URL

w3ctag/design-reviews#1142

Mozilla standards-positions issue URL

mozilla/standards-positions#1289

WebKit Bugzilla URL

https://bugs.webkit.org/show_bug.cgi?id=299375

Radar URL

No response

Description

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.

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