diff --git a/webroot/js/chat/chat-input.js b/webroot/js/chat/chat-input.js index 76a0e7a36..198501f5c 100644 --- a/webroot/js/chat/chat-input.js +++ b/webroot/js/chat/chat-input.js @@ -18,6 +18,7 @@ export default class ChatInput extends Component { constructor(props, context) { super(props, context); this.formMessageInput = createRef(); + this.emojiPickerButton = createRef(); this.messageCharCount = 0; this.maxMessageLength = 500; @@ -65,10 +66,7 @@ export default class ChatInput extends Component { custom: json, initialCategory: 'custom', showPreview: false, - position: { - top: '50%', - right: '100' - }, + position: 'top' }); this.emojiPicker.on('emoji', emoji => { this.handleEmojiSelected(emoji); @@ -81,7 +79,7 @@ export default class ChatInput extends Component { handleEmojiButtonClick() { if (this.emojiPicker) { - this.emojiPicker.togglePicker(this.emojiPicker); + this.emojiPicker.togglePicker(this.emojiPickerButton.current); } } @@ -253,20 +251,26 @@ export default class ChatInput extends Component { onPaste=${this.handlePaste} /> -