diff --git a/src/commands/view/Preview.js b/src/commands/view/Preview.js index a5abf0e32..5a35db21f 100644 --- a/src/commands/view/Preview.js +++ b/src/commands/view/Preview.js @@ -49,7 +49,9 @@ export default { const { sender = {} } = this; sender.set && sender.set('active', 0); const panels = this.getPanels(editor); - editor.runCommand('sw-visibility'); + if (editor.Panels.getButton("options","sw-visibility").attributes.active) { + editor.runCommand('sw-visibility'); + } editor.getModel().runDefault(); panels.style.display = ''; const canvas = editor.Canvas.getElement();