Merge commit '50fd94f481cf23a81662140afe99df2fbf1149be' into glitch-soc/merge-upstream
Conflicts: - `yarn.lock`: Upstream touched a dependency that is on an adjacent line to a glitch-soc-only dependency in that file. Updated as upstream did.
This commit is contained in:
commit
eb3aed9545
98 files changed
+1170
-177
No files matched your search
@@ -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 (
|
||||
<div className='emoji-picker-dropdown' onKeyDown={this.handleKeyDown} ref={this.setTargetRef}>
|
||||
@@ -397,7 +402,7 @@ class EmojiPickerDropdown extends PureComponent {
|
||||
inverted
|
||||
/>
|
||||
|
||||
<Overlay show={active} placement={'bottom'} target={this.findTarget} popperConfig={{ strategy: 'fixed' }}>
|
||||
<Overlay show={active} placement={placement} flip target={this.findTarget} popperConfig={{ strategy: 'fixed', onFirstUpdate: this.handleOverlayEnter }}>
|
||||
{({ props, placement })=> (
|
||||
<div {...props} style={{ ...props.style }}>
|
||||
<div className={`dropdown-animation ${placement}`}>
|
||||
|
||||
Reference in new issue
Block a user