diff --git a/chrome/content/zotero/components/icons.jsx b/chrome/content/zotero/components/icons.jsx
index 77d5eb84e9..e505b2d8ed 100644
--- a/chrome/content/zotero/components/icons.jsx
+++ b/chrome/content/zotero/components/icons.jsx
@@ -55,4 +55,5 @@ function i(name, svgOrSrc, hasDPI=true) {
i('TagSelectorMenu', "chrome://zotero/skin/tag-selector-menu.png")
i('DownChevron', "chrome://zotero/skin/searchbar-dropmarker.png")
+i('Xmark', "chrome://zotero/skin/xmark.png")
diff --git a/chrome/content/zotero/components/tabBar.jsx b/chrome/content/zotero/components/tabBar.jsx
index 9d9ce8cebc..6d23923a8a 100644
--- a/chrome/content/zotero/components/tabBar.jsx
+++ b/chrome/content/zotero/components/tabBar.jsx
@@ -27,6 +27,7 @@
import React, { forwardRef, useState, useRef, useImperativeHandle, useEffect } from 'react';
import cx from 'classnames';
+const { IconXmark } = require('./icons');
const TabBar = forwardRef(function (props, ref) {
const [tabs, setTabs] = useState([]);
@@ -44,6 +45,9 @@ const TabBar = forwardRef(function (props, ref) {
useImperativeHandle(ref, () => ({ setTabs }));
function handleMouseDown(event, id, index) {
+ if (event.target.closest('.tab-close')) {
+ return;
+ }
if (index != 0) {
draggingID.current = id;
}
@@ -109,7 +113,7 @@ const TabBar = forwardRef(function (props, ref) {
className="tab-close"
onClick={(event) => handleTabClose(event, id)}
>
- x
+