Issue #2637πŸ’¬ AnsweredOpened March 11, 2020by mcottret1 reactions

Preview mode & automatic components borders toggling

Quick answerby artf❀ 1

button would already be deactivated by the time Preview's run would be executed no matter what, is that correct ? oh yeah, right πŸ€¦β€β™‚ From your reply on the linked issue, I understand this behaviour is intended, so maybe the solution is simply to separate the two buttons contexts as you suggested ? Ok, it might actual...

Read full answer below ↓

Question

Hello again :) Our team recently started customising the editor & removing the webpage preset, and we might have found some bugs related to the preview mode:When exiting preview mode, an error can be raised if the default options panel has been removed, or if the sw-visibility button has been removed from it (from here, if editor.Panels.getButton('options', 'sw-visibility') yields null, cf #2589) A proposed solution would be to loop through the panels collection (retrieved via editor.Panels.getPanels) to find the sw-visibility button, as well as adding null-checks to avoid errors. ---When the...

Answers (3)

artfβ€’ March 21, 2020

button would already be deactivated by the time Preview's run would be executed no matter what, is that correct ? oh yeah, right πŸ€¦β€β™‚ From your reply on the linked issue, I understand this behaviour is intended, so maybe the solution is simply to separate the two buttons contexts as you suggested ?...

artfβ€’ March 18, 2020

Thanks @mcottret for all the references, really well-written issue :)When the preview & the sw-visibility buttons are in the same panel, the behaviour introduced by #2589 breaks, this seems to come from the ButtonView's active change listener , which deactivates all active buttons in the panel. So...

mcottretβ€’ March 20, 2020

Thanks for the reply @artf ! I'm sorry but I'm not sure how to make this work, from what I understand the active change listener gets executed before the Preview's run, so the sw-visibility button would already be deactivated by the time Preview's run would be executed no matter what, is that corre...

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.