[BUGS] Class selector set to active: false not working properly
Question
Hi i set: editor.on('selector:add', selector => selector.set({ active: false, }));
to NOT select class on element after click and editing css, it is working but after page refresh it is selecting element's classes again. Is there any way to fix it?
Answers (1)
I found solution. Selector:add is called only when new component is added, but selector settings for that component wont save. After page reload it wont be called to previously saved components so they will have default value (true). To fix this problem, call this after components has been loaded.
editor.SelectorManager.getAll().map(selector => { selector.set({ active: false }) })
Related Questions and Answers
Continue research with similar issue discussions.
Issue #2120
CSS properties of body (#wrapper) not editable after editor.setComponents(html);
When I save my page in a database refresh, the html and css are set like so $.ajax({ url: "../feeder.php", type: 'POST', processData: false...
Issue #631
How to refresh Classes view for active Component in the Style Manager
I'm using a trait (type=select) to change the class of a component (a "column" component, so classes representing width 1-12). After I have...
Issue #1072
Cannot add a new css rule if an element that is using it is not present in the html
HI, i'm using the latest build and i have the issue as described in the title. I am editing html and css separately. I have noticed that wh...
Issue #3627
[QUESTION]: I'm trying to duplicate the page, but the styles are not geting applied due to the Ids, changes to -2,-3 at the end.
This is what my function looks like. I am trying duplicate the page, the HTML part is fine but as css is applied through ids, when a new pa...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.