[Bug]: Custom panels not hidden in preview mode
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 :)
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
Great ! #2669 opened.