diff --git a/packages/neon_framework/packages/talk_app/lib/src/widgets/message_input.dart b/packages/neon_framework/packages/talk_app/lib/src/widgets/message_input.dart index 52a203b810e..58817eaad6f 100644 --- a/packages/neon_framework/packages/talk_app/lib/src/widgets/message_input.dart +++ b/packages/neon_framework/packages/talk_app/lib/src/widgets/message_input.dart @@ -116,7 +116,7 @@ class _TalkMessageInputState extends State { final textSelection = controller.selection; controller - ..text = text.replaceRange(textSelection.start, textSelection.end, emoji) + ..text = !textSelection.isValid ? emoji : text.replaceRange(textSelection.start, textSelection.end, emoji) ..selection = textSelection.copyWith( baseOffset: textSelection.start + emoji.length, extentOffset: textSelection.start + emoji.length,