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