From 00c159a1b4fbfa9912e8db32b3b6e362c4157021 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Fri, 2 Aug 2019 03:12:31 -0400 Subject: [PATCH] Fix incorrect top padding in tag selector if first tag doesn't fit --- chrome/content/zotero/components/tag-selector/tag-list.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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