From 3b18712bc7a1f8d46b74c791c1cd9a6e40c28135 Mon Sep 17 00:00:00 2001 From: Djorkaeff Alexandre Date: Wed, 20 May 2020 09:47:41 -0300 Subject: [PATCH] Revert "[FIX] Autocomplete position on Android (#2106)" (#2136) This reverts commit e8c38d6f6f69ae396a4aae6e37336617da739a6d. --- app/containers/MessageBox/index.js | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/app/containers/MessageBox/index.js b/app/containers/MessageBox/index.js index 7ca8db2c1..39e29dbc7 100644 --- a/app/containers/MessageBox/index.js +++ b/app/containers/MessageBox/index.js @@ -487,20 +487,10 @@ class MessageBox extends Component { } 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; + if (this.component && this.component.setNativeProps) { + this.component.setNativeProps({ text }); + } } setShowSend = (showSend) => {