From bda2d6b0a66b4a50a1313e1aebd50c4f4555ec15 Mon Sep 17 00:00:00 2001 From: lukebarnard <luke.barnard99@gmail.com> Date: Tue, 16 Jan 2018 10:44:11 +0000 Subject: [PATCH] Work around atlassian/react-beautiful-dnd#273 For some reason, after dragging an item the parent draggable receives a mouse click. The workaround is to use onMouseDown for deselecting tags --- src/components/structures/TagPanel.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/structures/TagPanel.js b/src/components/structures/TagPanel.js index 323528e1f1..a0a0e2d6e3 100644 --- a/src/components/structures/TagPanel.js +++ b/src/components/structures/TagPanel.js @@ -111,13 +111,14 @@ const TagPanel = React.createClass({ selected={this.state.selectedTags.includes(tag)} />; }); - return <div className="mx_TagPanel" onClick={this.onClick}> + return <div className="mx_TagPanel"> <DragDropContext onDragEnd={this.onTagTileEndDrag}> <Droppable droppableId="tag-panel-droppable"> { (provided, snapshot) => ( <div className="mx_TagPanel_tagTileContainer" ref={provided.innerRef} + onMouseDown={this.onClick} > { tags } { provided.placeholder }