diff --git a/src/components/PressableWithSecondaryInteraction/index.js b/src/components/PressableWithSecondaryInteraction/index.js index a4eb910f07b7..2c72d00dc6e7 100644 --- a/src/components/PressableWithSecondaryInteraction/index.js +++ b/src/components/PressableWithSecondaryInteraction/index.js @@ -15,7 +15,6 @@ class PressableWithSecondaryInteraction extends Component { super(props); this.executeSecondaryInteractionOnContextMenu = this.executeSecondaryInteractionOnContextMenu.bind(this); - this.preventDefault = this.preventDefault.bind(this); } componentDidMount() { @@ -23,20 +22,10 @@ class PressableWithSecondaryInteraction extends Component { this.props.forwardedRef(this.pressableRef); } this.pressableRef.addEventListener('contextmenu', this.executeSecondaryInteractionOnContextMenu); - this.pressableRef.addEventListener('touchstart', this.preventDefault); } componentWillUnmount() { this.pressableRef.removeEventListener('contextmenu', this.executeSecondaryInteractionOnContextMenu); - this.pressableRef.removeEventListener('touchstart', this.preventDefault); - } - - /** - * @param {touchstart} e - TouchEvent. - * https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent - */ - preventDefault(e) { - e.preventDefault(); } /** @@ -53,6 +42,7 @@ class PressableWithSecondaryInteraction extends Component { const defaultPressableProps = _.omit(this.props, ['onSecondaryInteraction', 'children', 'onLongPress']); return ( this.props.onSecondaryInteraction(e)} ref={el => this.pressableRef = el} // eslint-disable-next-line react/jsx-props-no-spreading