diff --git a/app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.jsx b/app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.jsx index acc3fd0ce5..43795d030f 100644 --- a/app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.jsx +++ b/app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.jsx @@ -330,6 +330,7 @@ class EmojiPickerDropdown extends PureComponent { state = { active: false, loading: false, + placement: 'bottom', }; setRef = (c) => { @@ -381,10 +382,14 @@ class EmojiPickerDropdown extends PureComponent { return this.target; }; + handleOverlayEnter = (state) => { + this.setState({ placement: state.placement }); + }; + render () { const { intl, onPickEmoji, onSkinTone, skinTone, frequentlyUsedEmojis } = this.props; const title = intl.formatMessage(messages.emoji); - const { active, loading } = this.state; + const { active, loading, placement } = this.state; return (
@@ -397,7 +402,7 @@ class EmojiPickerDropdown extends PureComponent { inverted /> - + {({ props, placement })=> (