Skip to content

Commit

Permalink
fix(useDisableBodyScroll): avoid affecting body's height (#1279)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoskolodny authored Oct 29, 2024
1 parent a141b97 commit b68f317
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion src/__tests__/hooks-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const INITIAL_BODY_STYLES = 'background: red;';
const DISABLED_BODY_STYLES =
INITIAL_BODY_STYLES +
' ' +
'overflow: hidden; overflow-y: scroll; position: fixed; top: 0px; left: 0px; right: 0px; bottom: 0px;';
'overflow: hidden; overflow-y: scroll; position: fixed; top: 0px; left: 0px; right: 0px;';

const DisableScroll = () => {
useDisableBodyScroll(true);
Expand Down
1 change: 0 additions & 1 deletion src/hooks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ export const useDisableBodyScroll = (disable: boolean): void => {
`top: ${-bodyScrollTop}px;`,
'left: 0px;',
'right: 0px;',
'bottom: 0px;',
'overscroll-behavior-y: contain;', // disable overscroll
].join('');
}
Expand Down

1 comment on commit b68f317

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for mistica-web ready!

✅ Preview
https://mistica-3cms61hpe-flows-projects-65bb050e.vercel.app

Built with commit b68f317.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.