Skip to content

Commit

Permalink
fix(mobile): header will be clipped when modal opened and page scroll…
Browse files Browse the repository at this point in the history
…ed (#8079)

close AF-1332

This issue is caused by radix, it will set `overflow: hidden` to body when modal opened. And header is implemented with `position: sticky`.

> **why not use `position: fixed` for header?**
>
> We need to handle `padding-top` manually to avoid content covered by header.
  • Loading branch information
CatsJuice committed Sep 4, 2024
1 parent 2524491 commit 51bc40d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/frontend/mobile/src/styles/mobile.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@ globalStyle('html', {
overflowY: 'auto',
background: cssVarV2('layer/background/secondary'),
});
globalStyle('body[data-scroll-locked][style]', {
overflow: 'clip !important',
});
2 changes: 2 additions & 0 deletions packages/frontend/mobile/src/views/home-header/styles.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ export const wsSelectorWrapper = style({
flex: 1,
height: wsSelectorHeight,
padding: '0 10px 0 16px',
display: 'flex',
alignItems: 'center',
});

export const settingWrapper = style({
Expand Down

0 comments on commit 51bc40d

Please sign in to comment.