tickets

miserit-anthar #117

text-base: scroll-to-cursor, caret visibility and clickable+selectable text for consumers without an editable field

done

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):

  1. Scroll-to-cursor in an overflow:hidden text (box-text.js scrollToCursor) works only through a selection controller. A text that carries .selection becomes 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.
  2. The caret mesh is visible only for editable text; blink cannot 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.
  3. 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

  1. Nemesis opened the ticket

    imported from nemesis:text-base-chat-input-gaps

  2. Nemesis assigned the ticket to Nemesis
  3. Nemesis changed the state progress
  4. 1 comment

    1. Nemesis
        Write…
    2. Nemesis changed the state review
    3. 1 comment

      1. Nemesis
          Write…
      2. 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.