← Back to release summary

Multi-Range Selection

Category
Miscellaneous
Type
New or changed feature
Status
Proposed (Chrome Proposed)
Intent stage
None

Summary

Enables Selection API to hold and manipulate multiple disjoint ranges within a single document. Users can create discontinuous text selections via input devices or JavaScript APIs, and clipboard copy includes all selected ranges joined with newline delimiters.

Motivation

Desktop applications like Microsoft Word and LibreOffice Writer support Ctrl+Click (Cmd+Click on macOS) to build non-contiguous selections. On the web, this interaction is blocked by spec-mandated single-range behavior in current Chromium, where Ctrl+Click replaces the existing selection. The gap is particularly noticeable for: Users switching between desktop editors and browsers who expect consistent Ctrl+Click behavior Power users copying non-adjacent table cells Web-based code editors that want native multi-cursor selection without custom overlays The Selection API exposes a Selection object with methods like addRange(), removeRange(), getRangeAt(index), and the rangeCount attribute, all originally designed for collections of disjoint Range objects. In 2011, the spec was narrowed to single-range semantics: addRange() is ignored when a range already exists, and rangeCount is constrained to 0 or 1. Chromium follows this restriction today, while Firefox has long supported multi-range behavior. Issue https://github.com/w3c/selection-api/issues/358 had been discussed in the W3C Web Editing Working Group to restore multi-range semantics and align implementations across browsers with the API’s original design intent.

Standards & signals

Ecosystem

Explainers: https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/Editing/multi-range-selection-explainer.md

View on chromestatus.com