You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-08 21:42:24 +03:00
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
This commit is contained in:
@@ -111,13 +111,14 @@ const TagPanel = React.createClass({
|
|||||||
selected={this.state.selectedTags.includes(tag)}
|
selected={this.state.selectedTags.includes(tag)}
|
||||||
/>;
|
/>;
|
||||||
});
|
});
|
||||||
return <div className="mx_TagPanel" onClick={this.onClick}>
|
return <div className="mx_TagPanel">
|
||||||
<DragDropContext onDragEnd={this.onTagTileEndDrag}>
|
<DragDropContext onDragEnd={this.onTagTileEndDrag}>
|
||||||
<Droppable droppableId="tag-panel-droppable">
|
<Droppable droppableId="tag-panel-droppable">
|
||||||
{ (provided, snapshot) => (
|
{ (provided, snapshot) => (
|
||||||
<div
|
<div
|
||||||
className="mx_TagPanel_tagTileContainer"
|
className="mx_TagPanel_tagTileContainer"
|
||||||
ref={provided.innerRef}
|
ref={provided.innerRef}
|
||||||
|
onMouseDown={this.onClick}
|
||||||
>
|
>
|
||||||
{ tags }
|
{ tags }
|
||||||
{ provided.placeholder }
|
{ provided.placeholder }
|
||||||
|
|||||||
Reference in New Issue
Block a user