KAD-5487 Advanced Headers - Sticky Headers have a height rendering issue when shrinking the middle row is enabled#971
Open
Open
Conversation
Contributor
|
🎉 Zip build complete |
…Sticky-Headers-have-a-height-rendering-issue-when-shrinking-the-middle-row-is-enabled Made-with: Cursor
…Sticky-Headers-have-a-height-rendering-issue-when-shrinking-the-middle-row-is-enabled
ravinderk
approved these changes
Apr 14, 2026
…Sticky-Headers-have-a-height-rendering-issue-when-shrinking-the-middle-row-is-enabled
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎫 #KAD-5487
🗒️ Description
Fix (bug fix - sticky header shrink overlap)
Fixed the sticky header with shrink middle row causing content overlap (~90px) when scrolling back to the top of the page.
Changes in
src/assets/js/kb-header-block.jsandincludes/assets/js/kb-header-block.min.js:Added a correction block at the end of
updateSticky()that runs after both the shrink and class/position logic have completed. AtscrollY === 0with shrink enabled, it:position,width,left,toptoinitialwhenisStickingis false — fixing the issue whereposition: fixedpersisted becausesetStickyChanged(false)ran too late and no further scroll event fired atscrollY === 0.elHeightmeasurement that was read before the shrink block restored the row to full height.Uses the same
isTransparent/hasStickySectionguard conditions already present in the function, so transparent headers without a sticky section are correctly skipped.Root cause: Two timing issues in
updateSticky():elHeightwas measured while the header row was still at its shrunk size, giving the placeholder a stale (too small) value.isStickingwas applied one frame behind — the position block used the previous frame's value (true), and since no further scroll event fires atscrollY === 0,position: fixedpersisted.🧪 Testing Instructions for QA
Checklist
Block specific checklist (where relevant)