{"record":{"id":"b88b1cbb70495142","repo":"Semantic-Org/Semantic-UI","slug":"element-is-hidden-you-must-call-refresh-after-ele-b88b1c","errorCode":null,"errorMessage":"Element is hidden, you must call refresh after element becomes visible. Use silent setting to surpress this warning in production.","messagePattern":"Element is hidden, you must call refresh after element becomes visible\\. Use silent setting to surpress this warning in production\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/definitions/modules/sticky.js","lineNumber":961,"sourceCode":"\n  // Called on each scroll\n  onScroll       : function(){},\n\n  // Called when element is stuck to viewport\n  onStick        : function(){},\n\n  // Called when element is unstuck from viewport\n  onUnstick      : function(){},\n\n  // Called when element reaches top of context\n  onTop          : function(){},\n\n  // Called when element reaches bottom of context\n  onBottom       : function(){},\n\n  error         : {\n    container      : 'Sticky element must be inside a relative container',\n    visible        : 'Element is hidden, you must call refresh after element becomes visible. Use silent setting to surpress this warning in production.',\n    method         : 'The method you called is not defined.',\n    invalidContext : 'Context specified does not exist',\n    elementSize    : 'Sticky element is larger than its container, cannot create sticky.'\n  },\n\n  className : {\n    bound     : 'bound',\n    fixed     : 'fixed',\n    supported : 'native',\n    top       : 'top',\n    bottom    : 'bottom'\n  }\n\n};\n\n})( jQuery, window, document );\n","sourceCodeStart":943,"sourceCodeEnd":978,"githubUrl":"https://github.com/Semantic-Org/Semantic-UI/blob/597843ab84d565cccfd8fd7719416350ae73e734/src/definitions/modules/sticky.js#L943-L978","documentation":"Semantic UI Sticky warning logged at sticky.js:161 inside checkErrors() when the sticky element is hidden at the moment stickiness is evaluated. Sticky needs measurable dimensions to position; a hidden element can't be measured, so the module warns the developer to refresh once the element becomes visible. Use silent:true to suppress in production.","triggerScenarios":"Initializing .sticky() on an element inside a hidden modal, collapsed accordion, display:none tab, or any zero-size ancestor; toggling the element's visibility at runtime without calling $('.el').sticky('refresh').","commonSituations":"Lazy-rendered panels; SPA route changes; modals that initialize sticky before opening; CSS hiding via parent opacity/display.","solutions":["Call $('.el').sticky('refresh') once the element becomes visible.","Defer $('.el').sticky() initialization until the parent is shown (e.g. on modal 'onVisible').","Set silent:true to suppress the warning in production once you have wired refresh correctly."],"exampleFix":"// before\n$('.ui.sticky').sticky({ context: '#content' }); // ancestor hidden\n// after\n$modal.modal({ onVisible: function(){ $('.ui.sticky').sticky('refresh'); } });","handlingStrategy":"validation","validationCode":"function ensureVisibleThenSticky($el, opts) {\n  if (!$el.is(':visible')) {\n    var obs = new MutationObserver(function(){\n      if ($el.is(':visible')) { $el.sticky(opts); obs.disconnect(); }\n    });\n    obs.observe(document.body, { attributes: true, subtree: true, attributeFilter: ['class','style','hidden'] });\n    return;\n  }\n  $el.sticky(opts);\n}","typeGuard":"function isStickyElementVisible($el) { return $el.length > 0 && $el.is(':visible'); }","tryCatchPattern":null,"preventionTips":["Call sticky('refresh') from modal/tab 'onVisible' callbacks.","Defer sticky init until the element is shown.","Set silent:true once refresh is wired to suppress production noise."],"tags":["semantic-ui","sticky","hidden-element","lifecycle"],"backgroundTag":null,"analyzedSha":"597843ab84d565cccfd8fd7719416350ae73e734","analyzedAt":"2026-08-13T01:44:23.827Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}