Skip to content

Honor user-select for retained text interaction #791

Description

@wieslawsoltes

Merged implementation status — 20 September 2026

PR #792 merged to WebScene main at 3dc62a1c7a81f0820af771849aae60350cde30f0 and closed this issue. It implements the bounded reusable property, pointer Selection default action, default system highlight paint, author ::selection overrides, and authored correctness/performance gates. Consolidation #76 consumes it at aead09f34a0230848796bee503110bd5d7226d97; local vscode-demo pins it at 5f7d00f9 and remains unpushed.

git diff --check passed before merge. No build, test, WPT, visual, package, memory, lifecycle, accessibility, or benchmark command ran; those acceptance items remain open as zero evidence under their owning epics.

Parent epic: #235
Interaction owner: #260
Accessibility owner: #262
Capability-ledger owner: #263
Release owner: #227

Problem

Unchanged Code OSS 645f29cc3176500b4b5762ba887cf2a7f0ffdf2c contains 276 user-select declarations across 94 source/extension files: 97 canonical none, 60 canonical text, one canonical all, six canonical initial, plus 112 WebKit/MS-prefixed equivalents. They govern Monaco native selection policy, lists, dialogs, hovers, terminal, notebooks, Chat, media preview, Simple Browser, and webview content.

WebScene main c8f44e44d1dfce77e643421cc801ac00799a19a6 exposes no user-select property or vendor aliases. It already has Selection/Range state, caret hit testing, retained selection paint, copy/outbound-drag integration, and ::selection, but ordinary pointer input never creates a document text selection. Treating the declarations as accepted CSS without connecting the default action would be a false compatibility claim.

Focused implementation

  • expose canonical user-select and -webkit-/-ms- aliases through native/managed metadata and CSSOM;
  • cascade/reset/serialize auto, text, none, and all in cold style state;
  • resolve the used value through ancestor auto behavior without adding a hot-node field;
  • create/update bounded document Selection state from pointer down/move/up using existing caret hit testing;
  • suppress user-created selection for none, allow explicit descendant text, and select the nearest all subtree atomically;
  • dispatch cancelable selectstart, preserve programmatic Selection/Window.find, and publish only paint changes without layout;
  • keep unchanged Code OSS untouched and avoid platform widgets or a browser shell.

Authored quality and performance gates

Add direct CSSOM/cascade/alias contracts, pointer drag and reversed drag geometry, none suppression, text override, all, cancelable selectstart, Unicode offsets, ::selection paint, copy/drag handoff, mutation/removal, iframe isolation, teardown, and a 4,096-node interaction benchmark requiring bounded hit/cascade work, zero layout from property mutation, bounded scene publications, and stable memory.

Acceptance status

  • Focused reusable implementation merged in PR Honor user-select for retained text interaction #792 at 3dc62a1c.
  • Browser/native interaction and pixel contracts passed.
  • Performance, memory, lifecycle, and accessibility bounds passed.
  • Exact unchanged Code OSS editor/list/dialog/terminal/Chat regions passed.

Per the active implementation-only direction, source review and git diff --check may precede merge; unexecuted gates must remain recorded as zero evidence.

Metadata

Metadata

Assignees

No one assigned

    Labels

    vscode-oss/plannedPlanned for the AppScene/WebScene VS Code OSS integration

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions