Skip to content

Implement text control select-all defaults - #334

Merged
wieslawsoltes merged 1 commit into
mainfrom
fix/text-control-select-all-331
Sep 17, 2026
Merged

wieslawsoltes merged 1 commit into
mainfrom
fix/text-control-select-all-331

Conversation

@wieslawsoltes

@wieslawsoltes wieslawsoltes commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

Unchanged Code OSS sent an existing absolute folder path to the remote picker as /Users//private/tmp/... because native Meta+A reached WebScene but did not run the browser default that selects a text control's value. This adds the uncancelled Meta/Ctrl+A default action for eligible inputs and textareas, preserves Alt/cancellation/inert/disabled/non-text behavior, and exposes exact UTF-16 selection positions while retaining byte-safe WTF-8 storage.

Chromium oracle:

  • absolute Unicode path: length 33, selection [0,33], replacement Z
  • Aβ🙂Z: length 5, selected range [2,4], replacement AβRZ
  • A🙂Z: caret [2,2] remains between surrogate units; range replacement with end selection mode produces code units [65,55357,82,56898,90] and caret [3,3]

The runtime stores an explicit UTF-16 suboffset for positions inside an astral scalar. setSelectionRange, selection getters/setters, text editing, and setRangeText convert through that representation; lone surrogate results round-trip through the existing WTF-8 DOM string boundary.

Validation on exact base 5a749a83, head 7b82b0a9:

  • focused Release select-all gate: 10,000 bounded select/replace/cancel cycles in 0.491236s
  • V8 heap: 679,944 -> 679,944 bytes; DOM nodes: 19 -> 19; peak RSS: 37,404,672 -> 43,466,752 bytes
  • focused select-all, punctuation keyboard, and shortcut activation CTests passed
  • generated WebIDL binding catalog regeneration/check passed
  • live overlap audit: PR Direct media recascade through CSS dependencies #335 shares only the native test registry aggregation path and changes disjoint media-query registration lines; PR Add Code OSS browser and native desktop compatibility #76 is docs-only
  • packaged Code OSS browser baseline already accepts the exact absolute fixture path; AppScene Make transition frame-demand test deterministic #131 remains open for rebuilt-package POSIX/~, spaces, Unicode, dot/dotdot, trailing separator, symlink, missing-path, <=2s settle, observer p95, cancellation, and memory acceptance

Closes #331
Related: SceneTech/AppScene#131

@wieslawsoltes
wieslawsoltes force-pushed the fix/text-control-select-all-331 branch from 0148328 to 7b82b0a Compare September 17, 2026 22:05
@wieslawsoltes
wieslawsoltes merged commit f977a21 into main Sep 17, 2026
8 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Meta/Ctrl+A default selection in text controls

1 participant