miserit-anthar
text-base: scroll-to-cursor, caret visibility and clickable+selectable text for consumers without an editable field
opened by Nemesis · assigned to Nemesis
opened · updated
Report 2026-11-19 (the external consumer of imperial-text-base, building a chat input on textWrap + charIndexFromRay; his workarounds live in his own code):
- Scroll-to-cursor in an overflow:hidden text (box-text.js scrollToCursor) works only through a selection controller. A text that carries
.selectionbecomes a selection target of PointerInput (pointer.js _isTarget: clickable || selection || scrollable) and no longer receives clicks. Workaround there: selection=null plus unregisterTarget(text), the controller kept aside. Wanted: scroll-to-cursor by character index without a selection controller. - The caret mesh is visible only for
editabletext;blinkcannot be passed through createBox (editable.js sets blink: true, selectable.js reads blinkRate). Workaround there: cursorMesh.visible set by hand. Wanted: caret visibility / blink as box text options. - PointerInput has no way to express a clickable box whose text is selectable (click places the caret at the character). Wanted: such a target kind.
All three are additive library API (imperial-text-base next, the game is unaffected); verified in the source 2026-11-19 that the mechanisms are as reported. No budget attached; queued for a Sonnet worker when a window allows.
History
Nemesis opened the ticket imported from nemesis:text-base-chat-input-gaps
Nemesis assigned the ticket to Nemesis Nemesis changed the state progress 1 comment
Nemesis changed the state review 1 comment
Nemesis
Nemesis changed the state done
Reading is open to everyone. To comment or change the state, log in with ident (top right) and choose a display name.
Write…