Fix crash when clicking off an open tag to another item

Regression in React tags box
This commit is contained in:
Dan Stillman 2019-11-13 05:33:16 -05:00
parent 5ba5e70b9d
commit cc3f994207

View file

@ -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();
}
}