Skip to content

Commit

Permalink
Remove touch listeners from multi select as they won't do anything
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Sep 28, 2017
1 parent 410caac commit 35254af
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
6 changes: 0 additions & 6 deletions editor/modes/visual-editor/block-list.js
Expand Up @@ -57,14 +57,12 @@ class VisualEditorBlockList extends Component {
document.addEventListener( 'copy', this.onCopy );
document.addEventListener( 'cut', this.onCut );
window.addEventListener( 'mousemove', this.setLastClientY );
window.addEventListener( 'touchmove', this.setLastClientY );
}

componentWillUnmount() {
document.removeEventListener( 'copy', this.onCopy );
document.removeEventListener( 'cut', this.onCut );
window.removeEventListener( 'mousemove', this.setLastClientY );
window.removeEventListener( 'touchmove', this.setLastClientY );
}

setLastClientY( { clientY } ) {
Expand Down Expand Up @@ -141,10 +139,8 @@ class VisualEditorBlockList extends Component {
this.startLowerBoundary = pageYOffset + boundaries.bottom;

window.addEventListener( 'mousemove', this.onPointerMove );
window.addEventListener( 'touchmove', this.onPointerMove );
window.addEventListener( 'scroll', this.onScroll );
window.addEventListener( 'mouseup', this.onSelectionEnd );
window.addEventListener( 'touchend', this.onSelectionEnd );
}

onSelectionChange( uid ) {
Expand Down Expand Up @@ -176,10 +172,8 @@ class VisualEditorBlockList extends Component {
delete this.startLowerBoundary;

window.removeEventListener( 'mousemove', this.onPointerMove );
window.removeEventListener( 'touchmove', this.onPointerMove );
window.removeEventListener( 'scroll', this.onScroll );
window.removeEventListener( 'mouseup', this.onSelectionEnd );
window.removeEventListener( 'touchend', this.onSelectionEnd );
}

onPlaceholderKeyDown( event ) {
Expand Down
1 change: 0 additions & 1 deletion editor/modes/visual-editor/block.js
Expand Up @@ -393,7 +393,6 @@ class VisualEditorBlock extends Component {
onKeyPress={ this.maybeStartTyping }
onDragStart={ ( event ) => event.preventDefault() }
onMouseDown={ this.onPointerDown }
onTouchStart={ this.onPointerDown }
className="editor-visual-editor__block-edit"
>
<BlockCrashBoundary onError={ this.onBlockError }>
Expand Down

0 comments on commit 35254af

Please sign in to comment.