Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: A border on the mj-column is shown twice in the editor #290

Closed
adiux opened this issue May 31, 2022 · 6 comments
Closed

BUG: A border on the mj-column is shown twice in the editor #290

adiux opened this issue May 31, 2022 · 6 comments

Comments

@adiux
Copy link

adiux commented May 31, 2022

What browser are you using?

Chrome 102.0.5005.61

Reproducible demo link

https://codepen.io/adiux/pen/BaYrEXR?editors=1111

Describe the bug

How to reproduce the bug?

  1. Add grapesjs-mjml to the project with any version newer than 0.5.6
  2. Add a border to a section. E.g.: <mj-column border="4px solid #F45E43">
  3. Open MJML template with grapesjs

What is the expected behavior?
only one border is shown:
image

What is the current behavior?
two borders are shown:
image

If is necessary to execute some code in order to reproduce the bug, paste it here below:

// Working
import grapesjsMjml from "https://cdn.skypack.dev/grapesjs-mjml@0.5.6";

// Not working
import grapesjsMjml from "https://cdn.skypack.dev/grapesjs-mjml@0.5.7";
import grapesjsMjml from "https://cdn.skypack.dev/grapesjs-mjml@0.6.0";

Note: The rendered HTML is fine. It is only an issue with the view in the editor.

@DRoet
Copy link
Collaborator

DRoet commented Jun 11, 2022

PRs are welcome to fix this, I currently don't have time to look into this myself

@ronaldohoch
Copy link

@DRoet does you have any idea to where to start looking for this issue?

@DRoet
Copy link
Collaborator

DRoet commented Jun 13, 2022

probably related to the changes in #270 which was released in v0.5.7

@adiux
Copy link
Author

adiux commented Jun 14, 2022

Thanks for looking into this. For me it was not working with v0.6.0:

import grapesjsMjml from "https://cdn.skypack.dev/grapesjs-mjml@0.6.0";

@gustavohleal
Copy link
Contributor

gustavohleal commented Jun 14, 2022

I thought i have found a solution, but it cause bugs to other attributes.

@gustavohleal
Copy link
Contributor

Even before #270 the border was added to the table inside the div. With the solution of adding the styles to the div the border is being added to both of them. This is whats causing this bug. I'm not finding where this is passed to the inner element. But when you change the padding of the column the element is rendered again and the problem is fixed. Something in the builtin property of border is causing this. Border-radius is also passed to the table and not rendered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants