mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-29 14:19:03 +01:00
[Glitch] Fix inserting emojis from emoji picker fails with TypeError
Port ac8e4ed38d
to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
parent
bb4fa0c374
commit
cc265f760e
1 changed files with 4 additions and 4 deletions
|
@ -160,10 +160,10 @@ class ComposeForm extends ImmutablePureComponent {
|
|||
|
||||
// Inserts an emoji at the caret.
|
||||
handleEmojiPick = (data) => {
|
||||
const { textarea: { selectionStart } } = this;
|
||||
const { onPickEmoji } = this.props;
|
||||
if (onPickEmoji) {
|
||||
onPickEmoji(selectionStart, data);
|
||||
const position = this.textareaRef.current.selectionStart;
|
||||
|
||||
if (this.props.onPickEmoji) {
|
||||
this.props.onPickEmoji(position, data);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue