Issue #765Opened January 16, 2018by perfect-coders2 reactions

editor.on('block:drag:stop') event doesn't work

Question

I am using this event many times in the application in the previous library. Now I have updated the library. I have updated the following libraries -

  1. Grapesjs Library
  2. Grapesjs-Preset-Webpage Library
  3. Grapesjs-Basic-Blocks Library

But it stops working now. Let me know if there is any change in this event.

Answers (3)

artfJanuary 17, 20181 reactions

Hi @perfect-coders, with the latest version https://github.com/artf/grapesjs/releases/tag/v0.13.5 the HTML5 drag and drop is enabled by default (disableable by nativeDnd option) and unfortunately I wasn't able to keep such events with this approach. The new d&d module provides similar functionality but now it's more generic, therefore canvas:drop will be triggered with any component drop (from blocks or any other OS source). So you have two options:

  1. Keep the new d&d module and replace your old block:drag:stop events with something this
editor.on('canvas:drop', (DataTransfer, model) => {
	// ... 
})
  1. Disable the new module
grapesjs.init({
	//...
	nativeDnd: false
})

Thanks for pointing this out, actually I'll update the changelog

perfect-codersJanuary 17, 20181 reactions

Thanks very much for the quick answer. I always love your quick feedback. I have some investment options for you. Hope to hear from you soon.

cgatianMay 17, 20180 reactions

This stumped me. The documentation is out of date

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.