Issue #2359πŸ’¬ AnsweredOpened October 30, 2019by sheldon5forever1 reactions

Absolute mode, component's style missing when dragged into canvas

Quick answerby pouyamiralayi❀ 1

@artf yes! this is not happening if i remove `script`. the behavior is fine.

Read full answer below ↓

Question

Hi guys, I'm working with grapesjs which version is '0.15.8', and in 'absolute' mode when I drag a block into canvas, I find the styles of component are missing. Define component as following: And I found the code in Droppable here: /utils/Droppable.js@L78 the component's styles are replaced. Should 'addStyle' be used here instead of 'setStyle'?

Answers (3)

pouyamiralayiβ€’ October 31, 2019

@artf yes! this is not happening if i remove script. the behavior is fine.

pouyamiralayiβ€’ October 30, 2019

Hi @sheldonwr this bug you are referring to is not reproducible in my side, here i tried your type definition on the demo and it is working, please check the below code and see what is missing in your side: the issue i observed with this component was that when i move it around, the component stops...

artfβ€’ October 31, 2019

Ok, actually a weird thing happens when a component has script property defined... Thanks for the report guys, I'll check this out. Can you confirm that without script it behaves correctly?

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...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins β†’
Premium option

Premium plugins ship with support, regular updates, and production-ready features β€” save days of integration work.

Browse premium plugins β†’

Related tutorials

In-depth guides on the same topic.

All tutorials β†’

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.