]> BookStack Code Mirror - bookstack/blobdiff - resources/js/components/editor-toolbox.js
Fixed phpstan wanring about usage of static
[bookstack] / resources / js / components / editor-toolbox.js
index 354bf0a86b3262f4a5e14a9e446ea87ee9405c65..3a1442d75150f043b821795d21e709f4578fcccc 100644 (file)
@@ -41,7 +41,9 @@ class EditorToolbox {
             if (cName === tabName) this.contentElements[i].style.display = 'block';
         }
 
-        if (openToolbox) this.elem.classList.add('open');
+        if (openToolbox && !this.elem.classList.contains('open')) {
+            this.toggle();
+        }
     }
 
 }