PixiDom - v1.0.0
    Preparing search index...

    Function moveCaretVertically

    • Move a caret up (direction = -1) or down (+1) one line, keeping the horizontal position — pass desiredX to preserve a "sticky column" across repeated vertical moves. Moving up from the first line goes to index 0; moving down from the last goes to the end of the text (matching DOM textarea behavior).

      Parameters

      • layout: TextLayout
      • index: number
      • direction: -1 | 1
      • OptionaldesiredX: number

      Returns number