[FIX] App crash with backspace on input message (#906)
* Fix - App crash with backspace on input message * Improving code to fix backspace bug * Fix destructuring undefined * Improvement code to fix backspace bug
This commit is contained in:
parent
29286e98a8
commit
957182bf55
|
@ -188,7 +188,7 @@ class MessageBox extends Component {
|
||||||
this.handleTyping(!isTextEmpty);
|
this.handleTyping(!isTextEmpty);
|
||||||
this.setInput(text);
|
this.setInput(text);
|
||||||
|
|
||||||
if (this.component) {
|
if (!isTextEmpty) {
|
||||||
const { start, end } = this.component._lastNativeSelection;
|
const { start, end } = this.component._lastNativeSelection;
|
||||||
const cursor = Math.max(start, end);
|
const cursor = Math.max(start, end);
|
||||||
const lastNativeText = this.component._lastNativeText;
|
const lastNativeText = this.component._lastNativeText;
|
||||||
|
|
Loading…
Reference in New Issue