      this.control = this.theme.getFormControl(this.label, this.input, this.description);
  
      if(this.schema.readOnly || this.schema.readonly) {
-@@ -6213,10 +7040,12 @@
+@@ -6213,10 +7068,12 @@
      titles = titles || [];
      select.innerHTML = '';
      for(var i=0; i<options.length; i++) {

     this.collapsed = false;
     this.toggle_button = this.getButton('','collapse',this.translate('button_collapse'));
     this.title_controls.appendChild(this.toggle_button);
@@ -3778,21 +4411,109 @@
       if(self.collapsed) {
         self.collapsed = false;
         if(self.panel) self.panel.style.display = '';

+      else{
+          editor.container.style.display = 'none';
+      }
+
     });
     self.refreshValue();
     self.refreshHeaderText();
@@ -4547,17 +5283,18 @@
     this.switcher = this.theme.getSwitcher(this.display_text);
     container.appendChild(this.switcher);
     this.switcher.addEventListener('change',function(e) {
