add header cloak after all panels are added (#7325)

add header cloak after all panels are added (#7325)

diff --git a/app/assets/javascripts/discourse/widgets/header.js.es6 b/app/assets/javascripts/discourse/widgets/header.js.es6
index 8d99160..1a0e7a2 100644
--- a/app/assets/javascripts/discourse/widgets/header.js.es6
+++ b/app/assets/javascripts/discourse/widgets/header.js.es6
@@ -327,9 +327,6 @@ export default createWidget("header", {
       } else if (state.userVisible) {
         panels.push(this.attach("user-menu"));
       }
-      if (this.site.mobileView) {
-        panels.push(this.attach("header-cloak"));
-      }
 
       additionalPanels.map(panel => {
         if (this.state[panel.toggle]) {
@@ -342,6 +339,10 @@ export default createWidget("header", {
         }
       });
 
+      if (this.site.mobileView) {
+        panels.push(this.attach("header-cloak"));
+      }
+
       return panels;
     };

GitHub sha: 6f1652bb