grapesjs icon indicating copy to clipboard operation
grapesjs copied to clipboard

[Bug]: Custom panels not hidden in preview mode

Open mcottret opened this issue 6 years ago • 2 comments

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 using the built-in preview mode with custom panels, the custom panels are not hidden when entering preview mode.

If we look at the source, the preview command uses the editor.Panels.getPanelsEl function to retrieve the panels to hide, which corresponds to the "internal" panels element containing the built-in panels.

A proposed solution would be to rather loop through the panels collection (retrieved via editor.Panels.getPanels) and toggle their visible attribute. What do you think ?

I'd be happy to open a PR to fix it, let me know :)

mcottret avatar Mar 11 '20 16:03 mcottret

A proposed solution would be to rather loop through the panels collection (retrieved via editor.Panels.getPanels) and toggle their visible attribute. What do you think ?

Yeah, it makes totally sense. Go ahead with the PR, thank you very much

artf avatar Mar 18 '20 12:03 artf

Great ! #2669 opened.

mcottret avatar Mar 19 '20 13:03 mcottret