diff --git a/chrome/content/zotero/components/tag-selector/tag-list.jsx b/chrome/content/zotero/components/tag-selector/tag-list.jsx index 865445eef0..1e4397942f 100644 --- a/chrome/content/zotero/components/tag-selector/tag-list.jsx +++ b/chrome/content/zotero/components/tag-selector/tag-list.jsx @@ -78,8 +78,8 @@ class TagList extends React.PureComponent { for (let i = 0; i < this.props.tags.length; i++) { let tag = this.props.tags[i]; let tagWidth = tagPaddingLeft + Math.min(tag.width, tagMaxWidth) + tagPaddingRight; - // If cell fits, add to current row - if ((rowX + tagWidth) < (this.props.width - panePaddingLeft - panePaddingRight)) { + // If first row or cell fits, add to current row + if (i == 0 || ((rowX + tagWidth) < (this.props.width - panePaddingLeft - panePaddingRight))) { positions[i] = [rowX, panePaddingTop + (row * rowHeight)]; } // Otherwise, start new row