Skip to content

Reordering Iframes/embeds causes blocks to be blanked #549

@paulalden

Description

@paulalden

After some digging I found that the onDragStart method within block-reorder.js creates a cloned element, however if the block is an embed, then the process never completes, so st-block--dragging class is never removed from the block and it looks like its crashed.

The following method seems to work perfectly without generating the text preview:

onDragStart: function onDragStart(ev) {
  var block = this.block;
  ev.dataTransfer.setData("text/plain", this.blockId());
  this.mediator.trigger("block-controls:hide");
  EventBus.trigger("block:reorder:dragstart");
},

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions