Issue #2661💬 AnsweredOpened March 16, 2020by h3llomoto0 reactions

ToggleStateCls returns js error

Quick answerby artf

Can you create a live demo, please? By default definition, you shouldn't be able to see Comment component in Layers

Read full answer below ↓

Question

Hi there, guys. I found a bug at the LayerManager: I've got an html comment as a layer in the LM. I click the comment. I get an error at the console:

Uncaught TypeError: Cannot read property 'remove' of undefined

And the code this error relates to is: src/style_manager/view/SectorsView.js:47

  toggleStateCls(targets = [], enable) {
    targets.forEach(trg => {
      const el = trg.getEl();
      el && el.classList[enable ? 'add' : 'remove'](helperCls);
    });
  },

So, html comments cant have classList property and this is the bug.

Answers (2)

artfMarch 19, 2020

Can you create a live demo, please? By default definition, you shouldn't be able to see Comment component in Layers

no-response[bot]March 29, 2020

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we ne...

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 →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.