This reverts commit e8c38d6f6f
.
This commit is contained in:
parent
e8c38d6f6f
commit
3b18712bc7
|
@ -487,20 +487,10 @@ class MessageBox extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
setInput = (text) => {
|
setInput = (text) => {
|
||||||
if (this.component && this.component.setNativeProps) {
|
|
||||||
const props = { text };
|
|
||||||
|
|
||||||
if (isAndroid) {
|
|
||||||
const diff = text.length - this.text?.length;
|
|
||||||
const selection = this.component?.lastNativeSelection;
|
|
||||||
const start = selection?.start + diff >= 0 ? selection?.start + diff : text.length;
|
|
||||||
const end = selection?.end + diff >= 0 ? selection?.start + diff : text.length;
|
|
||||||
props.selection = { start, end };
|
|
||||||
}
|
|
||||||
|
|
||||||
this.component.setNativeProps(props);
|
|
||||||
}
|
|
||||||
this.text = text;
|
this.text = text;
|
||||||
|
if (this.component && this.component.setNativeProps) {
|
||||||
|
this.component.setNativeProps({ text });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setShowSend = (showSend) => {
|
setShowSend = (showSend) => {
|
||||||
|
|
Loading…
Reference in New Issue