Issue #1396πŸ’¬ AnsweredOpened Sep 1, 2018by jmrgz0 reactions

Background image layers

Quick answerby artf

Thanks @xamdam777 for the report. Actually, as you already indicated, this happens when you import the style (and browser's CSS parsers are pretty messy), and unfortunately, in few cases, conflicts happen. (eg. Chrome generates a style that even itself doesn't understand) the strange think happens here when you add a...

Read full answer below ↓

Question

Bug: when your pre-defined block or saved templates have two or more background layers, if you add a new layer, a lot of new empty layers are created. How to reproduce it:Go to https://grapesjs.com/demo.htmlSelect the pink Header blockGo to Decorations -> background and add a new layerDeselect the pink Header and select it againGo to Decorations -> background, you will see new empty layersIf you repeat the previous cycle, you will get hundreds of empty layers. 30 seconds video showing the problem: https://screencast-o-matic.com/watch/cFQVb0q4Ex It happens in Chrome, Safari and Firefox, last v...

Answers (2)

artfβ€’ Sep 2, 2018

Thanks @xamdam777 for the report. Actually, as you already indicated, this happens when you import the style (and browser's CSS parsers are pretty messy), and unfortunately, in few cases, conflicts happen. (eg. Chrome generates a style that even itself doesn't understand) the strange think happens...

jmrgzβ€’ Sep 4, 2018

Thank you very much @artf, now I completely understand the problem, damned browser's parsers! :) I have been doing some tests in addLayer() and refreshLayers(). This is my current approach, modifying refreshLayers() function, I try to detect the wrong layers and do not show them. I placed the code...

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.