You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-20 16:22:28 +03:00
Fix click background to deselect
This commit is contained in:
@@ -84,8 +84,6 @@ const TagPanel = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
onClick(e) {
|
onClick(e) {
|
||||||
// Ignore clicks on children
|
|
||||||
if (e.target !== e.currentTarget) return;
|
|
||||||
dis.dispatch({action: 'deselect_tags'});
|
dis.dispatch({action: 'deselect_tags'});
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -116,7 +114,11 @@ const TagPanel = React.createClass({
|
|||||||
<img src="img/logos/riot-logo.svg" />
|
<img src="img/logos/riot-logo.svg" />
|
||||||
</AccessibleButton>
|
</AccessibleButton>
|
||||||
<div className="mx_TagPanel_divider" />
|
<div className="mx_TagPanel_divider" />
|
||||||
<GeminiScrollbar autoShow={true} className="mx_TagPanel_scroller">
|
<GeminiScrollbar
|
||||||
|
className="mx_TagPanel_scroller"
|
||||||
|
autoShow={true}
|
||||||
|
onClick={this.onClick}
|
||||||
|
>
|
||||||
<Droppable
|
<Droppable
|
||||||
droppableId="tag-panel-droppable"
|
droppableId="tag-panel-droppable"
|
||||||
type="draggable-TagTile"
|
type="draggable-TagTile"
|
||||||
@@ -125,11 +127,6 @@ const TagPanel = React.createClass({
|
|||||||
<div
|
<div
|
||||||
className="mx_TagPanel_tagTileContainer"
|
className="mx_TagPanel_tagTileContainer"
|
||||||
ref={provided.innerRef}
|
ref={provided.innerRef}
|
||||||
// react-beautiful-dnd has a bug that emits a click to the parent
|
|
||||||
// of draggables upon dropping
|
|
||||||
// https://github.com/atlassian/react-beautiful-dnd/issues/273
|
|
||||||
// so we use onMouseDown here as a workaround.
|
|
||||||
onMouseDown={this.onClick}
|
|
||||||
>
|
>
|
||||||
{ tags }
|
{ tags }
|
||||||
{ provided.placeholder }
|
{ provided.placeholder }
|
||||||
|
|||||||
Reference in New Issue
Block a user