Can't remove style property on selected device
Question
Hi, have a problem with removing style property on selected device (clearProperties: true). You can reproduce the problem on https://grapesjs.com/demo.html. Steps:Clean everything.Drag custom code.Add this sample code.Switch devices to tablet or mobile and select the component.In the Typography style you can see that the COLOR property is YELLOW and there is NO clean icon. I have X icon only on desktop device but on mobile or tablet is just yellow label.
Answers (3)
@artf do you have idea how can i fix it?
To make the StyleManager read the proper style rule your media query should reflect the same width of the selected Device. Did you try it?
Yes I do it. deviceManager: { devices: [ { name: 'Desktop', width: '', priority: 3 }, { name: 'Tablet', width: '768px', widthMedia: '991px', priority: 2 }, { name: 'Mobile', width: '360px', height: '640px', widthMedia: '767px', priority: 1 }] },
Related Questions and Answers
Continue research with similar issue discussions.
Issue #6152
CSS added via custom code persists after custom code component is removed
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? any Reproducible demo link https://grapesj...
Issue #3082
XSS Vulnerability in Live Preview
Version: 0.16.22 Are you able to reproduce the bug from the demo? [ x] Yes Steps:Click Import HTMLInsert <img src="anyimagesource.gif" onlo...
Issue #2700
[Bug] Hover editor result in TypeError: this[0].getAttribute is not a function
Are you using the latest release (older versions are NOT supported)? Yes, using latest v0.16.3 version. What happen? Upgraded from WORKING...
Issue #6683
Modals close on mouseup event outside of modal rather than a full click
GrapesJS version [x] I confirm to use the latest version of GrapesJS What browser are you using? Chrome 143.0.7499.169 Reproducible demo li...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.
Browse free plugins β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.