Layer visibility does not work properly
Thanks for the report @tranthanhhoa I'll fix it in the next release, but I think I'll keep the visibility change more like a global condition, so the hidden component won't be visible on all devices.
Read full answer below βQuestion
Version: 0.17.4
How to reproduce
- Switch to tablet or mobile mode
- Hide the selected component by toggling the visibility icon of Layer
- Switch to desktop mode.
Result
- The visibility icon is still disabled while the hidden components is showing.
Expected
- After switch to desktop the visibility icon is enabled.
Answers (2)
Thanks for the report @tranthanhhoa I'll fix it in the next release, but I think I'll keep the visibility change more like a global condition, so the hidden component won't be visible on all devices.
Thanks for reporting this, @tranthanhhoa. Great question about Layer visibility does not work properly. The recommended approach with Components is to use the event-driven API. Start here: Check the GrapesJS documentation for your specific module Look for the on() event listener method Most operati...
Related Questions and Answers
Continue research with similar issue discussions.
Issue #5378
Uncaught TypeError: Cannot read properties of undefined (reading 'Canvas') while dragging a component in Layer Manager Panel
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome v116.0.5845.97 Reproducible demo li...
Issue #6358
BlockManager config "appendOnClick" does not work anymore
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome v131 Reproducible demo link https:/...
Issue #3939
Disabled drag and drop in preview
GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? v95Reproducible demo link https://codesandbo...
Issue #5245
Contents of component with editable:false are still editable
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome 114.0.5735.198 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 βRelated tutorials
In-depth guides on the same topic.
Tutorial
Introducing GJS.Market Services: ship your GrapesJS editor without the integration risk
It's everything that usually eats weeks of engineering time, scoped and priced up front. No open-ended hourly surprises.
Tutorial
GrapesJS custom components guide (2026)
Define custom GrapesJS components with DomComponents.addType: detection with isComponent, a model with traits and defaults, and a view for canvas behavior.
Tutorial
Building an AI-Assisted Document Engine with Next.js, GrapesJS, and the AI SDK
Transform your static template editor into an intelligent, generative design workspace with Vercel AI SDK, AI Elements and Next.js.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.