CurveEditor popover now opens with its text selected

This commit is contained in:
Aria Minaei 2021-11-14 21:30:09 +01:00
parent c9fe91db30
commit fb53be8fe6

View file

@ -109,6 +109,7 @@ const CurveEditorPopover: React.FC<
const inputRef = useRef<HTMLInputElement>(null) const inputRef = useRef<HTMLInputElement>(null)
useLayoutEffect(() => { useLayoutEffect(() => {
inputRef.current!.focus() inputRef.current!.focus()
inputRef.current!.setSelectionRange(0, 100)
}, []) }, [])
const {index, trackData} = props const {index, trackData} = props