Skip to content

Commit 1a89176

Browse files
authored
fix(FixedFooterLayout): obscured focus (#1334)
fix(FixedFooterLayout): fixed footer layout obscured focus * This pull request includes a small change to the `FixedFooterLayout` component in `src/fixed-footer-layout.tsx`. The change ensures that when the footer is visible, a style is applied to set the `scroll-padding-bottom` to the height of the footer. * [`src/fixed-footer-layout.tsx`](diffhunk://#diff-a20f24af3140080300870a68a5accb89feee523f1c59592a9e57d0f2bf4d02baR166): Added a style element to set `scroll-padding-bottom` when the footer is visible. This commit is related to [[O2DE-6995](https://jira.tid.es/browse/O2DE-6995)].
1 parent bcc9d25 commit 1a89176

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/fixed-footer-layout.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,13 @@ const FixedFooterLayout = ({
163163
{renderBackground()}
164164
{children}
165165
</div>
166+
{isFooterVisible && isFooterFixed && (
167+
/**
168+
* This style is added to the `html` element to prevent the footer
169+
* from covering the focus of elements when there is overflow.
170+
*/
171+
<style>{`html {scroll-padding-bottom: ${domFooterHeight}px}`}</style>
172+
)}
166173
<div
167174
className={classnames(styles.footer, {
168175
[styles.withoutFooter]: !isFooterVisible,

0 commit comments

Comments
 (0)