From cc3f99420706f61ba0cf0e610d057a72164e814f Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Wed, 13 Nov 2019 05:33:16 -0500 Subject: [PATCH] Fix crash when clicking off an open tag to another item Regression in React tags box --- chrome/content/zotero/components/itemPane/tagsBox.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/content/zotero/components/itemPane/tagsBox.jsx b/chrome/content/zotero/components/itemPane/tagsBox.jsx index 9dd7d3dbef..09672acb11 100644 --- a/chrome/content/zotero/components/itemPane/tagsBox.jsx +++ b/chrome/content/zotero/components/itemPane/tagsBox.jsx @@ -269,7 +269,7 @@ const TagsBox = React.forwardRef((props, ref) => { } function blurOpenField(event) { - if (textboxRef.current && event.target != textboxRef.current) { + if (textboxRef.current && (!event || event.target != textboxRef.current)) { textboxRef.current.blur(); } }