Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Workaround for atlassian/react-beautiful-dnd#273 #1782

Merged
merged 1 commit into from
Mar 1, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/components/structures/TagPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const TagPanel = React.createClass({
}
},

onClick(e) {
onMouseDown(e) {
dis.dispatch({action: 'deselect_tags'});
},

Expand Down Expand Up @@ -128,7 +128,9 @@ const TagPanel = React.createClass({
<GeminiScrollbar
className="mx_TagPanel_scroller"
autoshow={true}
onClick={this.onClick}
// XXX: Use onMouseDown as a workaround for https://github.com/atlassian/react-beautiful-dnd/issues/273
// instead of onClick. Otherwise we experience https://github.com/vector-im/riot-web/issues/6253
onMouseDown={this.onMouseDown}
>
<Droppable
droppableId="tag-panel-droppable"
Expand Down
6 changes: 4 additions & 2 deletions src/components/views/groups/GroupTile.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const GroupTile = React.createClass({
});
},

onClick: function(e) {
onMouseDown: function(e) {
e.preventDefault();
dis.dispatch({
action: 'view_group',
Expand All @@ -79,7 +79,9 @@ const GroupTile = React.createClass({
const httpUrl = profile.avatarUrl ? this.context.matrixClient.mxcUrlToHttp(
profile.avatarUrl, avatarHeight, avatarHeight, "crop",
) : null;
return <AccessibleButton className="mx_GroupTile" onClick={this.onClick}>
// XXX: Use onMouseDown as a workaround for https://github.com/atlassian/react-beautiful-dnd/issues/273
// instead of onClick. Otherwise we experience https://github.com/vector-im/riot-web/issues/6156
return <AccessibleButton className="mx_GroupTile" onMouseDown={this.onMouseDown}>
<Droppable droppableId="my-groups-droppable" type="draggable-TagTile">
{ (droppableProvided, droppableSnapshot) => (
<div ref={droppableProvided.innerRef}>
Expand Down