only honor selection range in textarea
This commit is contained in:
parent
5958875f1e
commit
6a49f37c68
|
@ -187,8 +187,10 @@ function InputInner ({
|
|||
if (selectionRange.start <= selectionRange.end && innerRef?.current) {
|
||||
const { start, end } = selectionRange
|
||||
const input = innerRef.current
|
||||
if (props.type === 'textarea') {
|
||||
input.setSelectionRange(start, end)
|
||||
}
|
||||
}
|
||||
}, [selectionRange.start, selectionRange.end])
|
||||
|
||||
const invalid = (!formik || formik.submitCount > 0) && meta.touched && meta.error
|
||||
|
|
Loading…
Reference in New Issue