MCPcopy Create free account
hub / github.com/adobe/react-spectrum / setCursor

Function setCursor

packages/@react-spectrum/ai/src/TokenField.tsx:625–627  ·  view source on GitHub ↗
(root: Element, pos: Position, fireEvent = false)

Source from the content-addressed store, hash-verified

623
624// TODO: do we want to export these?
625export function setCursor(root: Element, pos: Position, fireEvent = false) {
626 setSelection(root, pos, pos, fireEvent);
627}
628
629export function setSelection(root: Element, start: Position, end: Position, fireEvent = false) {
630 let selection = window.getSelection();

Callers 3

Table.tsxFile · 0.85
loadFunction · 0.85
TokenField.tsxFile · 0.85

Calls 1

setSelectionFunction · 0.85

Tested by

no test coverage detected