SheetXL - v1.0.2
    Preparing search index...

    Function getTextareaCaretRect

    • Measure the on-screen caret rect for textarea at index (default: the current selectionStart). Uses a hidden mirror div — pass a persistent one (the hook does) to avoid per-call DOM churn; omit it and a transient mirror is created + removed. Returns a zero-size rect at the origin when there is no DOM / element (SSR-safe).

      Parameters

      • textarea: HTMLTextAreaElement | null | undefined
      • Optionalindex: number
      • Optionalmirror: HTMLElement
      • padding: number = 0

      Returns CaretRect