diff --git a/editor/components/block-list/block.js b/editor/components/block-list/block.js index d057cf2ed8c93b..8ed784acc3eccf 100644 --- a/editor/components/block-list/block.js +++ b/editor/components/block-list/block.js @@ -104,6 +104,7 @@ export class BlockListBlock extends Component { this.stopTypingOnMouseMove = this.stopTypingOnMouseMove.bind( this ); this.mergeBlocks = this.mergeBlocks.bind( this ); this.onFocus = this.onFocus.bind( this ); + this.preventDrag = this.preventDrag.bind( this ); this.onPointerDown = this.onPointerDown.bind( this ); this.onKeyDown = this.onKeyDown.bind( this ); this.onBlockError = this.onBlockError.bind( this ); @@ -280,6 +281,18 @@ export class BlockListBlock extends Component { } } + /** + * Prevents default dragging behavior within a block to allow for multi- + * selection to take effect unhampered. + * + * @param {DragEvent} event Drag event. + * + * @returns {void} + */ + preventDrag( event ) { + event.preventDefault(); + } + onPointerDown( event ) { // Not the main button. // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button @@ -407,7 +420,7 @@ export class BlockListBlock extends Component {