grapesjs icon indicating copy to clipboard operation
grapesjs copied to clipboard

Not works with jquery

Open ateshuseyin opened this issue 9 years ago • 8 comments

I use jquery in my project. After version 0.12.8 it does not work with jquery.

Prt of my webpack.config is;

resolve: {
    modules: [
      path.resolve(__dirname, 'node_modules/grapesjs/src'),
      path.resolve(__dirname, 'node_modules')
    ],
    alias: {
      'cash-dom': 'jquery'
    }
  },
  externals: {
    'jquery': 'jQuery'
  },

When I try to drop a block it throws;

ComponentsView.js:76 Uncaught TypeError: Cannot read property 'length' of undefined at child.addToCollection (ComponentsView.js:76) at child.addTo (ComponentsView.js:22) at triggerEvents (backbone.js:371) at triggerApi (backbone.js:356) at eventsApi (backbone.js:155) at child.Events.trigger (backbone.js:346) at child._onModelEvent (backbone.js:1187) at triggerEvents (backbone.js:372) at triggerApi (backbone.js:357) at eventsApi (backbone.js:155)

ateshuseyin avatar Oct 20 '17 13:10 ateshuseyin

Do you get the same error with all of your blocks? Even with some official one?

artf avatar Oct 23 '17 12:10 artf

Right. I get the same error with all blocks defined in mjml plugin.

ateshuseyin avatar Oct 24 '17 12:10 ateshuseyin

Ok, I'd like to understand if it's something related to jquery. Are you able to reproduce it without the mjml plugin? (latest version)

artf avatar Oct 24 '17 13:10 artf

I try to run mjml plugin with several versions of grapesjs. mjml plugin works with 0.12.6 and older but get above error with 0.12.7 and newer

ateshuseyin avatar Oct 24 '17 13:10 ateshuseyin

Ok. I will try without mjml plugin

ateshuseyin avatar Oct 24 '17 13:10 ateshuseyin

Can you reproduce it with http://codesandbox.io please?

artf avatar Oct 25 '17 12:10 artf

@artf This issue is about mjml plugin. This can be closed. I will open an issue to mjml plugin

ateshuseyin avatar Oct 31 '17 11:10 ateshuseyin

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

lock[bot] avatar Sep 18 '19 08:09 lock[bot]