GrapesJS / mjml

Newsletter Builder with MJML components in GrapesJS
http://grapesjs.com/demo-mjml.html
BSD 3-Clause "New" or "Revised" License
618 stars 218 forks source link

BUG: Found a Bug in MJML Image Block #339

Open RakulAgn opened 8 months ago

RakulAgn commented 8 months ago

Description:

When attempting to set the height and width of an image to "auto" in the Grapesjs MJML Example on the official site, an error is thrown in the Chrome console. Once this error occurs, the image cannot be cloned unless it is completely removed.

### Steps to Reproduce:

Expected Behavior:

The image's height and width should adjust to "auto" without any errors. Cloning functionality should remain unaffected.

Actual Behavior:

An error is thrown in the console when setting the image's height and width to "auto". Cloning functionality for the image is disabled until the image is completely removed.

RakulAgn commented 8 months ago

@artf

ronaldohoch commented 6 months ago

Hi @RakulAgn, auto is not a valid value to mj-image, if you remove the width property of mj-image it will be set to 100%. image https://mjml.io/try-it-live/4WyCHcXK1A

RakulAgn commented 6 months ago

Yeah thats right but its not handled in grapesjs mjml. in user point of view what if they type auto incase ?

ronaldohoch commented 6 months ago

Thanks for finding this.

Here we have a custom build of mjml, so we have solved :D

Also, i've made a PR to it. https://github.com/GrapesJS/mjml/pull/344

RakulAgn commented 6 months ago

Thanks dude it took 2 month :(