Skip to content

Commit

Permalink
[Fix] Add emoji to cursor position (close evgeny-nadymov#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeny-nadymov committed Oct 16, 2019
1 parent 53a6125 commit ac66ee5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"homepage": "http://evgeny-nadymov.github.io/telegram-react",
"name": "telegram_react",
"version": "0.0.469",
"version": "0.0.470",
"private": true,
"dependencies": {
"@material-ui/core": "^3.9.2",
Expand Down
3 changes: 2 additions & 1 deletion src/Components/ColumnMiddle/InputBoxControl.js
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,8 @@ class InputBoxControl extends Component {
handleEmojiSelect = emoji => {
if (!emoji) return;

this.newMessageRef.current.innerText += emoji.native;
document.execCommand('insertText', false, emoji.native);
this.newMessageRef.current.focus();
this.handleInput();
};

Expand Down

0 comments on commit ac66ee5

Please sign in to comment.