{"record":{"id":"e3a418f1a59d86c0","repo":"Semantic-Org/Semantic-UI","slug":"had-to-add-pusher-element-for-optimal-performance","errorCode":null,"errorMessage":"Had to add pusher element. For optimal performance make sure body content is inside a pusher element","messagePattern":"Had to add pusher element\\. For optimal performance make sure body content is inside a pusher element","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"src/definitions/modules/sidebar.js","lineNumber":1024,"sourceCode":"    visible   : 'visible'\n  },\n\n  selector: {\n    fixed   : '.fixed',\n    omitted : 'script, link, style, .ui.modal, .ui.dimmer, .ui.nag, .ui.fixed',\n    pusher  : '.pusher',\n    sidebar : '.ui.sidebar'\n  },\n\n  regExp: {\n    ios          : /(iPad|iPhone|iPod)/g,\n    mobileChrome : /(CriOS)/g,\n    mobile       : /Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/g\n  },\n\n  error   : {\n    method       : 'The method you called is not defined.',\n    pusher       : 'Had to add pusher element. For optimal performance make sure body content is inside a pusher element',\n    movedSidebar : 'Had to move sidebar. For optimal performance make sure sidebar and pusher are direct children of your body tag',\n    overlay      : 'The overlay setting is no longer supported, use animation: overlay',\n    notFound     : 'There were no elements that matched the specified selector'\n  }\n\n};\n\n\n})( jQuery, window, document );\n","sourceCodeStart":1006,"sourceCodeEnd":1034,"githubUrl":"https://github.com/Semantic-Org/Semantic-UI/blob/597843ab84d565cccfd8fd7719416350ae73e734/src/definitions/modules/sidebar.js#L1006-L1034","documentation":"Emitted by Sidebar's setup.layout() (sidebar.js:322-324) when the context has no child matching selector.pusher ('.pusher'). Sidebar self-heals: it creates a <div class=\"pusher\">, wraps the non-omitted body children into it, refreshes, then logs this as a layout/performance advisory. Functionally harmless but signals non-optimal markup. It is a console.error (sidebar.js:818), not thrown.","triggerScenarios":"$('.sidebar').sidebar() on a <body> that has no .pusher element, so the guard at sidebar.js:322 triggers the auto-create path.","commonSituations":"Forgetting the <div class=\"pusher\"> wrapper in page markup, custom templates that omit it.","solutions":["Add <div class=\"pusher\"></div> as a direct child of body containing your page content.","Keep the sidebar and the pusher as direct children of the same context element."],"exampleFix":"<!-- before -->\n<body>\n  <div class=\"ui sidebar\"></div>\n  <div id=\"app\">content</div>\n</body>\n<!-- after -->\n<body>\n  <div class=\"ui sidebar\"></div>\n  <div class=\"pusher\">\n    <div id=\"app\">content</div>\n  </div>\n</body>","handlingStrategy":"validation","validationCode":"// Provide correct markup so the auto-push path never runs.\nfunction ensurePusher($ctx){\n  if ($ctx.children('.pusher').length === 0) {\n    $ctx.wrapInner('<div class=\"pusher\"></div>');\n  }\n}\n// Prefer authoring the .pusher in HTML directly.","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always author a <div class=\"pusher\"> as a direct child of body containing page content.","This is self-healing (sidebar.js:325-332) — the log is advisory, not a real failure.","Keep sidebar and pusher as direct children of the same context."],"tags":["sidebar","layout","markup"],"backgroundTag":null,"analyzedSha":"597843ab84d565cccfd8fd7719416350ae73e734","analyzedAt":"2026-08-13T01:44:23.827Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}