SheetXL - v0.8.0-beta.9+sites.210.e2d420901
    Preparing search index...

    Function useSelectDrag

    • Tracks a text-selection drag inside an input/textarea: true from the pointerdown that starts one until the pointer is released — which routinely happens OUTSIDE the input, hence the window listeners rather than a local mouseup.

      The hover eval tip has to yield to it. The tip is a hover affordance, but a drag-select is a mousemove with the button down, so it armed the tip on the very gesture meant to select text — and an armed tip both bands its run in the selection tint AND (in the cell editor) clears the input's own ::selection tint so the two don't stack. Net effect: dragging over a formula painted a highlight that looked like, but wasn't, the selection, and the real selection was invisible underneath — reading as "this field can't select text". So hosts begin() on pointerdown and gate their hover handler on isDragging().

      Parameters

      • OptionalonBegin: () => void
      • OptionalonEnd: () => void

      Returns SelectDrag