Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/MentionsInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,13 +244,14 @@ class MentionsInput extends React.Component {
return null
}

const { position, left, top } = this.state.suggestionsPosition
const { position, left, right, top } = this.state.suggestionsPosition

const suggestionsNode = (
<SuggestionsOverlay
style={this.props.style('suggestions')}
position={position}
left={left}
right={right}
top={top}
focusIndex={this.state.focusIndex}
scrollFocusedIntoView={this.state.scrollFocusedIntoView}
Expand Down Expand Up @@ -732,6 +733,7 @@ class MentionsInput extends React.Component {

if (
position.left === this.state.suggestionsPosition.left &&
position.right === this.state.suggestionsPosition.right &&
position.top === this.state.suggestionsPosition.top &&
position.position === this.state.suggestionsPosition.position
) {
Expand Down
4 changes: 3 additions & 1 deletion src/SuggestionsOverlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ class SuggestionsOverlay extends Component {
focusIndex: PropTypes.number,
position: PropTypes.string,
left: PropTypes.number,
right: PropTypes.number,
top: PropTypes.number,
scrollFocusedIntoView: PropTypes.bool,
isLoading: PropTypes.bool,
Expand Down Expand Up @@ -72,6 +73,7 @@ class SuggestionsOverlay extends Component {
containerRef,
position,
left,
right,
top,
} = this.props

Expand All @@ -82,7 +84,7 @@ class SuggestionsOverlay extends Component {

return (
<div
{...inline({ position: position || 'absolute', left, top }, style)}
{...inline({ position: position || 'absolute', left, right, top }, style)}
onMouseDown={onMouseDown}
ref={containerRef}
>
Expand Down