Skip to content

Commit

Permalink
Merge pull request #588 from amelioro/fix-header-cut-off-2
Browse files Browse the repository at this point in the history
fix: header cut off (still)
  • Loading branch information
keyserj authored Dec 4, 2024
2 parents c6e65a5 + 0b39a11 commit 62f8bed
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/web/topic/utils/layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,11 @@ div.style.lineHeight = "1";
div.style.fontFamily = "inherit";
div.style.overflow = "hidden";
div.style.visibility = "hidden"; // don't show in DOM but still be added to it so height calcs work
div.style.position = "absolute"; // don't affect layout (visibility: hidden otherwise still affects layout)
// Don't affect layout (visibility: hidden otherwise still affects layout).
// Cannot for the life of me figure out why `absolute` still affects layout when tutorial is opened,
// yet `fixed` doesn't - Mozilla docs suggest the only difference is that `absolute` can be
// positioned relative to a positioned ancestor, but here there are no positioned ancestors.
div.style.position = "fixed";
div.tabIndex = -1;
div.ariaHidden = "true";
document.body.appendChild(div);
Expand Down

0 comments on commit 62f8bed

Please sign in to comment.