Skip to content
Snippets Groups Projects
Commit abdeb8db authored by Paul Kaplan's avatar Paul Kaplan
Browse files

Fix context menu coming up when dragging

parent 8611c9ff
Branches
Tags
No related merge requests found
......@@ -23,7 +23,7 @@ const SpriteSelectorItem = props => (
onMouseDown: props.onMouseDown,
onTouchStart: props.onMouseDown
}}
disable={props.dragging}
disable={props.preventContextMenu}
id={`${props.name}-${contextMenuId}`}
>
{typeof props.number === 'undefined' ? null : (
......@@ -91,7 +91,6 @@ SpriteSelectorItem.propTypes = {
className: PropTypes.string,
costumeURL: PropTypes.string,
details: PropTypes.string,
dragging: PropTypes.bool,
name: PropTypes.string.isRequired,
number: PropTypes.number,
onClick: PropTypes.func,
......@@ -101,6 +100,7 @@ SpriteSelectorItem.propTypes = {
onMouseDown: PropTypes.func,
onMouseEnter: PropTypes.func,
onMouseLeave: PropTypes.func,
preventContextMenu: PropTypes.bool,
selected: PropTypes.bool.isRequired
};
......
......@@ -114,6 +114,7 @@ class SpriteSelectorItem extends React.PureComponent {
return (
<SpriteSelectorItemComponent
costumeURL={this.getCostumeData()}
preventContextMenu={this.dragRecognizer.gestureInProgress()}
onClick={this.handleClick}
onDeleteButtonClick={onDeleteButtonClick ? this.handleDelete : null}
onDuplicateButtonClick={onDuplicateButtonClick ? this.handleDuplicate : null}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment