Skip to content

Commit 778aa4d

Browse files
committed
💄 update some styles to position: fixed
1 parent 71bd25d commit 778aa4d

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

client/components/mobile/FloatingNav.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import Button from '../../common/Button';
66
import IconButton from './IconButton';
77

88
const FloatingContainer = styled.div`
9-
position: absolute;
9+
position: fixed;
1010
right: ${remSize(16)};
1111
top: ${remSize(80)};
1212

client/components/mobile/Sidebar.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const SidebarWrapper = styled.div`
1212
height: 100%;
1313
width: ${remSize(180)};
1414
15-
position: absolute;
15+
position: fixed;
1616
z-index: 2;
1717
left: 0;
1818

client/components/useAsModal.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import styled from 'styled-components';
33
import { useModalBehavior } from '../utils/custom-hooks';
44

55
const BackgroundOverlay = styled.div`
6-
position: absolute;
6+
position: fixed;
77
z-index: 2;
88
width: 100% !important;
99
height: 100% !important;

client/utils/custom-hooks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export const useModalBehavior = (hideOverlay) => {
2828

2929

3030
const handleClickOutside = ({ target }) => {
31-
if (ref && ref.current && !ref.current.contains(target)) {
31+
if (ref && ref.current && !(ref.current.contains && ref.current.contains(target))) {
3232
hide();
3333
}
3434
};

0 commit comments

Comments
 (0)